LVOOP by ref deep case/unbundle structure nesting

Hi,
I have been experimenting with LVOOP for use in a relatively large project. I need lvoop by ref because the lvoop represents a actual object constructed in my dll and by ref implementation lets me keep track if this object is still valid since the ref gets deleted when the object is also deleted in my dll. In addition, the class holds (large) data referred to by many class VIs and it would have been wasteful to make many copies of it.
Anyway, I'm wondering if I'm doing this right because when accessing the class data I need to have deep nested structures and that doesn't seem too right. I'm attaching an example simple vi and a screenshot of the block diagram.
Here are the explanations for the deep structures:
1. Error case struct enclosing the whole block diagram.
2. Unbundle class object to get the DVR (I could possible unbundle this without this structure).
3. Unbundle the DVR to get the actual class cluster.
4. Error case structure in case the last unbundle failed.
5. Finally, unbudndle the class cluster to get the specific data item I want.
Thanks for any help,
Matt
Solved!
Go to Solution.
Attachments:
Get Keys.vi ‏34 KB

Hey myle00,
This implementation seems fine to me. Is there a reason you are concerned with having too many structures? As you noted, you could unbundle without using the "In Place Element Structure"; however, this structure can make the VI memory usage more efficient. If you are worried about the structures taking up space, you could always make it into a subVI (select the outside structure, go to edit>create subVI). Hope this helps!
Nathan H
Applications Engineering
National Instruments
Software Developer
National Instruments

Similar Messages

  • Translate to upper case a structure in ecc 6.0

    Hi,
    How to translate to upper case a structure in sys:ecc 6.0 (unicode) like it was possible in sys:4.7
    TRANSLATE s_tab TO UPPER CASE.
    now I have an error message: "s_tab shall be a character-type".
    thanks

    Hi,
    The usage of the method to convert codepages of structures is described including this code sample:
    DATA:BEGIN OF struc,
    text(5) TYPE c,
    int TYPE i,
    END OF struc.
    DATA:buffer TYPE xstring,
    conv TYPE REF TO cl_abap_conv_out_ce,
    view TYPE REF TO cl_abap_view_offlen.
    view = cl_abap_view_offlen=>create_legacy_view( struc ).
    conv = cl_abap_conv_out_ce=>create(
    encoding = '0120'
    endian = 'B' ).
    struc-text = 'Abc12'.
    struc-int = 65538.
    conv->convert_struc( EXPORTING data = struc
    view = view
    IMPORTING buffer = buffer ).
    Regards,
    Satish

  • Kindly refer to Case Id No. 525700065 in India.I have talked to various people on my case for more than 5 hours ( Total talk time) The people give various different answers and aim really fed up now. What do i do? Many apple phone users are especially fed

    Kindly refer to Case Id No. 525700065 in India.I have talked to various people on my case for more than 5 hours ( Total talk time) The people give various different answers and aim really fed up now. What do i do?
    Many apple phone users are especially fed up with RSGI Communication , Erandwana, Pune, Maharashtra, India.
    Their service report No. 36679.
    Allthough Mr Punit ( Technical Dept. Apple.) had requested RSGI to chance the device, still RSGI said they do not have the device ( I phone 5, white ,16GB) in stock.
    Today when we contacted them they said they won't be able to replace OR order to Apple unless and until we do not keep the device with them for 3 days.
    Mr Deepak of Technical Dept Apple was contacted who's telephonic Transript as proof is available with us.

    Who exactly are you addressing your screed to
    There are  no Apple Staff on this forum ,it is User to User

  • Deep XSD's structure not reflecting in ECC - Proxy code

    Dear forum members,
    Deep XSD's structure not reflecting in ECC - Proxy code. any suggestion please..
    With the help of XSD able to create service Interface - Outbound in PI, the complete structure is visible in PI but in ECC ( Tcode - Sproxy ) unable to view complete structure, top two nodes are visible remaining not reflecting in the ECC system.
    Cheers
    Rocky

    Hi Rocky ,
    Regenerate proxy in ECC and check again , structure will reflect.
    Note : Whenever we make changes(adding new fields or deletion of existing fields) to Data type / ED in PI . You have to generate the proxy structure (outbound or Inbound) in ECC and activate. Then changes will be reflected in Proxy also.
    Thanks
    Hari.

  • How to refer the fields of a nested structure

    Hi friends,
    I am facing problem in assigning value to nested structure fields.
    I have import parameter in FM which  is a Table type and line type (structure).
    in this structure there are 4 fields.
    Out of these 4 fields 1 is again a table type and line type(structure).
    I need to populate this inner structures fields and then assign the values back to main table type.
    e.g import parameter is zinput_detail type zdetail.
    zdetail is a table type and has zdetail_line as structure.
    zdetail_line fields are
    salesorder
    customer
    date
    weight is a field here and has table type as type i.e zweights.
    again zweights has a line type zweight_line.
    fields of zweight_line are
    weight1
    weight2.
    Now i need to populate weight1 and weight 2 and then assign these values back to main field weight.
    Kindly let me know, what to declare  for referring to the inner structure this and how to access this.
    Regards,
    pradeep

    Hi,
    Declare the seperate varible for the inner structure and fill the values in the newly declared struture and assign back to inner structure.
    Example
    DATA i_zdetail type zdetail with header line.
    DATA i_weight type z_weight with header llne.
    Fill the i_weight with required values and then
    i_zdetails-weight[] = i_weight[].
    Edited by: Avinash Kodarapu on Mar 10, 2009 8:59 PM

  • Case Structure Nested in a For Loop

    I have two pumps. I want one pump to be running and the other pump to be off. Then as soon as the first pump stops I want the other pump to start. I'd like this process to repeat as many times as I want. The code I have now uses a case structure inside a for loop. When the iteration is odd it is false and even is true this determines what case is carried out. Right now I have a code that can turn on one pump, stop it, and immediately start the second. However, after the second pump stops the first one does not start again. I've changed the number of iterations and I can't seem to get the process to continue. The program keeps running but the pumps stop doing anything. Attached is a file of my code as well as two image files (one showing true case and other showing false) of the same code.
    Attachments:
    Test Code 1.vi ‏31 KB
    Case if True.png ‏37 KB
    Case if False.png ‏35 KB

    Your code has an inner while loop that checks for the status of the pump.  Since you set up a target volume before the while loops start, I assume that it is what the status checks to determine when to stop the while loop.
    When the the second iteration ends, has the volume for the first pump changed at all?  If it is still the same, then the status is still at the target which means it will immediately stop after starting.  You may also want to put some small wait statements inside the inner while loops so that the status isn't checked as fast as the CPU will allow it to run eating up CPU cycles.

  • ABAP XSLT transformation - XML to deep structure/nested standard table

    Hi all,
    I was struggling with this topic recently and couldn't find a single working example or description of a possible solution. So now that I've sorted it out, I did a quick example to elustrate how it works. Here is the code with XML embeded in it and the XSLT follows:
    <HR>
    <PRE>
    *& Report  Z_XML2ABAP
    *& Author: Jayanta Roy
    *& Date: 03/02/2010
    REPORT  z_xml2abap.
    DATA input_xml TYPE string.
    TYPES: BEGIN OF t_address,
            house_no TYPE string,
            street_name TYPE string,
            city_name TYPE string,
            phone_no TYPE string,
          END OF t_address.
    TYPES: t_addresses TYPE STANDARD TABLE OF t_address with NON-UNIQUE KEY house_no.
    TYPES: BEGIN OF t_person,
            firstname TYPE string,
            surname TYPE string,
            addresses TYPE t_addresses,
          END OF t_person.
    input_xml = '&lt;Friends&gt;' &&
      '&lt;People&gt;' &&
        '&lt;FirstName&gt;Homer&lt;/FirstName&gt;' &&
        '&lt;Surname&gt;Simpson&lt;/Surname&gt;' &&
          '&lt;Address&gt;' &&
            '&lt;HouseNo&gt;123&lt;/HouseNo&gt;' &&
            '&lt;Street&gt;Evergreen Terrace&lt;/Street&gt;' &&
            '&lt;City&gt;Springfield&lt;/City&gt;' &&
            '&lt;PhoneNo&gt;011212321&lt;/PhoneNo&gt;' &&
          '&lt;/Address&gt;' &&
          '&lt;Address&gt;' &&
            '&lt;HouseNo&gt;7G&lt;/HouseNo&gt;' &&
            '&lt;Street&gt;Neuclear Power Plant&lt;/Street&gt;' &&
            '&lt;City&gt;Spring Field&lt;/City&gt;' &&
            '&lt;PhoneNo&gt;911&lt;/PhoneNo&gt;' &&
          '&lt;/Address&gt;' &&
      '&lt;/People&gt;' &&
      '&lt;People&gt;' &&
         '&lt;FirstName&gt;Bart&lt;/FirstName&gt;' &&
         '&lt;Surname&gt;Simpson&lt;/Surname&gt;' &&
           '&lt;Address&gt;' &&
             '&lt;HouseNo&gt;123x&lt;/HouseNo&gt;' &&
             '&lt;Street&gt;Evergreen Terracex&lt;/Street&gt;' &&
             '&lt;City&gt;Springfieldx&lt;/City&gt;' &&
             '&lt;PhoneNo&gt;011212321x&lt;/PhoneNo&gt;' &&
           '&lt;/Address&gt;' &&
       '&lt;/People&gt;' &&
    '&lt;/Friends&gt;' .
    DATA lt_person TYPE STANDARD TABLE OF t_person.
    TRY.
        CALL TRANSFORMATION xslt_person
        SOURCE XML input_xml
        RESULT  all_people = lt_person.
      CATCH cx_root.
        WRITE 'Problemo!'.
    ENDTRY.
    WRITE 'Now, debug the program to see the values read from the XML'.
    </PRE>
    <HR>
    and here is the XSLT Transformation program (xslt_person):
    <HR>
    <PRE>
    &lt;xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                        xmlns:sap="http://www.sap.com/sapxsl" version="1.0"&gt;
      &lt;xsl:strip-space elements="*"/&gt;
      &lt;xsl:template match="/"&gt;
        &lt;asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"&gt;
          &lt;asx:values&gt;
            &lt;ALL_PEOPLE&gt;
              &lt;xsl:apply-templates select="//People"/&gt;
            &lt;/ALL_PEOPLE&gt;
          &lt;/asx:values&gt;
        &lt;/asx:abap&gt;
      &lt;/xsl:template&gt;
      &lt;xsl:template match="People"&gt;
        &lt;ALLMYFRIENDS&gt;  &lt;!This element name is not relevent... needed to just group the loop&gt;
          &lt;FIRSTNAME&gt;
            &lt;xsl:value-of select="FirstName"/&gt;
          &lt;/FIRSTNAME&gt;
          &lt;SURNAME&gt;
            &lt;xsl:value-of select="Surname"/&gt;
          &lt;/SURNAME&gt;
          &lt;ADDRESSES&gt;
            &lt;xsl:for-each select="Address"&gt;
              &lt;ADDRESS&gt; &lt;!This element name is not relevent... needed to just group the loop&gt;
                &lt;HOUSE_NO&gt;
                  &lt;xsl:value-of select="HouseNo"/&gt;
                &lt;/HOUSE_NO&gt;
                &lt;STREET_NAME&gt;
                  &lt;xsl:value-of select="Street"/&gt;
                &lt;/STREET_NAME&gt;
                &lt;CITY_NAME&gt;
                  &lt;xsl:value-of select="City"/&gt;
                &lt;/CITY_NAME&gt;
                &lt;PHONE_NO&gt;
                  &lt;xsl:value-of select="PhoneNo"/&gt;
                &lt;/PHONE_NO&gt;
              &lt;/ADDRESS&gt;
            &lt;/xsl:for-each&gt;
          &lt;/ADDRESSES&gt;
        &lt;/ALLMYFRIENDS&gt;
      &lt;/xsl:template&gt;
    &lt;/xsl:transform&gt;
    </PRE>
    <HR>
    HTH,
    Jayanta.

    thanks a LOT Jayanta..
    I was looking for an XSLT example for some time.. this one atleast got me started in the right direction..
    THANKS

  • Case and decode - nested functions

    Can i use a case statement inside a decode or nvl2 function?
    eg.
    decode(col_a,'ABC',
    case when col_b in (1,2) then 'CCC' else when col_b in (3,4,5) then 'XXX' end
    , 'NA')
    Can i use a function like this basically, can i nest a case statement within a decode or nvl2 function?
    I have used nested decodes and nvls and nested case statements but not combined both so far.... so need an opinion...
    Thanks.
    Edited by: user254668 on Apr 30, 2010 1:35 PM

    user254668 wrote:
    Can i use a case statement inside a decode or nvl2 function? Absolutely. Just get rid of that else:
    decode(col_a,'ABC',
    case when col_b in (1,2) then 'CCC' when col_b in (3,4,5) then 'XXX' end
    , 'NA') SY.

  • REF TO DATA to Structure

    Hi Folks!
    I got a little problem with moving data.
    I'm using ref to data for a general data definition. Unfortunately after I create the data using a certain type, let's say 'A', I cant move the data of the created data to a structure of type 'A'. (It can also be type 'B'; that depends on the user input; thats why I am using ref to data).
    Is there a way to move the data from the cre3ated structure to the static type structure?
    I'm looking forward to reading from you
    Best Regards!

    Hey Kamil,
    You can use a field symbol to move the data like this:
    data: dyn_struc type ref to data.
    stat_struc type A.
    field-symbols <fs> type data.
    create data dyn_struc type A.
    assign dyn_struc->* to <fs>.
    stat_struc = <fs>.
    Of course, this will only work if dyn_struc was actually created with type A. Otherwise, the last line will cause a runtime error.
    Best regards,
    Erik

  • SWF file contains ref. to local dir structure

    Newbie here; sorry.
    Flash CS4 Professional, ver. 10
    Am creating a simple flash video to get my feet wet. In the
    process, I am drowning.
    I created the video with Flash (ActionScript 3.0) by
    inserting a player object, and specifying a f4v source that I had
    created using the CS4 Media Encoder to convert a wmv file; nothing
    to it.
    Publish Preview worked fine. Publish Settings/Publish created
    the necessary files, just as decribed in a Flash 411 tutorial:
    http://tv.adobe.com/?trackingid=EBYHH&pss=fl_10.0.0_win_en_full__PF_20040226#vi+f1527v1000 .
    Video works fine on my local PC (XP, SP2). But when I load it
    to my server, it does not work. In IE 7, the page loads; source
    code is there, but the window is blank:
    http://www.bbhq.us/pva1.html
    Adding mime type to .htaccess file did not solve the problem.
    Changing permissions to the files did not, either.
    It apparently is not a server problem. A simple swf file
    created by Mr. Gates and simple HTM coding works:
    http://www.bbhq.us/flash3.htm
    What does Mr. Gates know that I do not?
    Well, where do I begin???
    However, when I loaded my file --
    http://www.bbhq.us/pva1.html
    -- in FireFox 2.0, I got a blank window, but also this revealing
    error message:
    SecurityError: Error #2148: SWF file
    http://www.bbhq.us/pva1.swf
    cannot access
    local resource F:\pva1\pva0117a.f4v. Only
    local-with-filesystem and
    trusted local SWF files may access local resources.
    at flash.net::NetStream/play()
    at fl.video::VideoPlayer/
    http://www.adobe.com/2007/flash/flvplayback/internal::_play()
    at fl.video::VideoPlayer/
    http://www.adobe.com/2007/flash/flvplayback/internal::_setUpStream()
    at fl.video::VideoPlayer/
    http://www.adobe.com/2007/flash/flvplayback/internal::_load()
    at fl.video::VideoPlayer/load()
    at fl.video::FLVPlayback/doContentPathConnect()
    That tells me that the swf file has my original directory
    location and file name(s) -- F:\pva1\... -- embedded in it. No
    wonder!
    However, I cannot see where in Flash I specify a directory
    structure for my video, other than, of course, when I originally
    specified the video to add to the player component. But somehow,
    the swf file picks up the directory structure as part of the file
    names. That boat does not float.
    Adobe help did not throw me a life preserver; it tossed me a
    lead weight, instead.
    Must be a settings issue somewhere, or I am missing something
    obvious that I just cannot see.
    Goin' down here for the 3d time. A little help here, please.
    Thanks.

    Thanks for your quick response. But it left me still treading
    water.
    Yep; got to the content inspector; The parameters that I see
    are as follows:
    align
    autoplay
    cuepoints
    islove
    preview
    scalemode
    skin
    skinautohide
    skinbackgroundalpha
    skinbackgrundcolor
    source
    volume
    There is no contentpath parameter/property.
    This help page references the contentpath that you
    referenced:
    http://help.adobe.com/en_US/Flash/10.0_UsingFlash/WS0ED77F00-2006-49aa-8399-92B6D5D8CE00.h tml#WS9A834D6F-8206-4e07-B840-456EF90C03CB
    It describes the contentpath as you suggested:
    "contentPath (AS2 files) String that specifies the URL to an
    FLV"
    The reference to AS2 in parens suggests that this parameter
    applies only to AS2 files. Or, perhaps this parameter is not
    applicable in CS4, version 10. I donno, but I sure do not see it in
    my version of Flash.
    However, you and the the help page did throw me a lifeline.
    WIth the f4v file already loaded on my server, I modified my
    project, specifying, as the source parameter, the name of my fv4
    file as it is loaded on the server -- http:www.myserver...fv4 --
    not the file on my local PC. So when Flash published the project,
    it uses that name, with no reference to my local directory..
    Of course, the f4v file must exist on the server for it to
    publish properly.
    That did it.
    It makes sense, but it is certainly not obvious and it is not
    explained in any documentation I have found.
    Am I the only one to whom this was not obvious?
    Thanks; you led me to a solution.
    jjt

  • Ref table & field ina structure

    Hi,
    I've a quantity field in a standard structure. As reference field it has 'unit' field from another structure.
    Is it possible to display the units along with quantity in an ABAP report?
    Regards..

    Hi,
    Sample Program to disply the Units ..
    REPORT demo_list_write_unit LINE-SIZE 40.
    DATA: num1 TYPE p DECIMALS 1 VALUE 1,
          num2 TYPE p DECIMALS 4 VALUE '2.5'.
    SET COUNTRY 'US'.
    WRITE: 'KG', num1 UNIT 'KG', num2 UNIT 'KG',
         / 'PC', num1 UNIT 'PC', num2 UNIT 'PC'.
    This Program is for Currency
    REPORT demo_list_write_currency LINE-SIZE 40.
    DATA: num1 TYPE p  DECIMALS 4 VALUE '12.3456',
          num2 TYPE p  DECIMALS 0 VALUE '123456'.
    SET COUNTRY 'US'.
    WRITE: 'USD', num1 CURRENCY 'USD', num2 CURRENCY 'USD',
         / 'BEF', num1 CURRENCY 'BEF', num2 CURRENCY 'BEF',
         / 'KUD', num1 CURRENCY 'KUD', num2 CURRENCY 'KUD'.
    Regards
    Sudheer

  • In the attached VI I dont understand why data from the inner case structures are not being transmitted to the array.

    In the attached VI I don't understand why data from the inner case structures are not being transmitted to the array.
    Thank you.
    Solved!
    Go to Solution.
    Attachments:
    TEMP.vi ‏25 KB

    It took me some time to figure what you are trying to do but I think I have it now.
    The SR is still required.
    What is happening is your "Bundle By Name" is replacing all of the fields of the cluster, not just the value coming out of the case structure. So to maintain the cluster stuff you do in earlier iterations you can either...
    1) Put the "Index array, Bundle by name, and Replace array" inside the case structure and ONLY bundle the value you are setting in that iteration. (as you will see Tim post shortly)
    OR
    2) Move the Index array before the Case, unbundle all of the fields and feed teh case structure and run them across the case so that ALL of your output tunnels come from the coresponding input tunnel EXCEPT for the filed you are trying to set.
    Ben
    Message Edited by Ben on 05-05-2010 01:31 PM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Fill deep output Structure of Enterprise Service

    Hello at all,
    I created an Enterprise Service which contains an Input and Output Structure.
    My Problem is, that the Output structure is very deep and this structure contains tabletyps and further structures.
    How can I fill a field of the Output structure?
    I almost use the Method "describe_by_name", which gives me the components of the "first-Level-structure (lt_components).
    Lt_components is filled with different components and types, for example "TTYPE" or "STRU".
    One Component of type TTYPE contains a further structure, ... and so on.
    At the End of this deep structure (up to 9 Levels) are fields with type of string.
    How can I fill These fields?
    I hope you can help me.
    Thanks in advance.
    Andreas O.
    Attached you will find a small example.

    Hello Andreas,
    You can access deep structure like the you access flat structure fields but with some restrictions.
    One of things to take care is use the compatible type for the component that is being accessed.
    This link will help you ABAP Keyword Documentation
    As per you screen shot below statement can be used to access first table.
    Table type <tt> = output-getOrderResponse-<Structure1>-<table1>
    You can also refer below blog series :
    Deeper Dive into Deep structure - part 1
    Deeper Dive into Deep structure - part 2
    Deeper Dive into Deep structure - part 3
    Deeper Dive into Deep structure - part 4

  • Using nested Event Structures

    Hi ,
    I wanna clarify whether using nested event structures in a vi is good Labview programming ?
    I have a vi which has two event structures nested,assuming it has two buttons GO1 and GO2.
    The outer event structure handles event triggered by GO1 and inner event structure handles Go2.
    The outer structure does fine by handling the button click on GO1,the problem is inability of inner
    event structure to handle click on GO2 button.
    I'm also attaching a sample.vi for reference.It would be great if you could help me
    solve this issue.Thanks in advance.
    Regards,
    Nalin
    Attachments:
    sample.vi ‏30 KB

    You can actually make this work, but like the others, I don't recommend it.
    To make your VI work. Right click on the "GO1" structure and select "Edit Events.....". At the bottom of the dialog, there is a checkbox that reads "Lock Front Panel until the event case for this event completes". With this checked, all front panel objects are locked until the GO1 event completes. This is what is causing the GO2 button not to work. Uncheck this and your application will work as you want it to.
    If your intent is to have GO2 disabled until you click GO1, try the attached VI. It uses property nodes to disable the GO2 button until you click the GO1.
    Another thing that you have setup that doesn't look necessary is the Timeout event, especially set to 1ms. The basic idea of the Event Structure is to not have to constantly poll for front panel events. If you just deleted the timeout event cases and removed the 1ms constant, your application would just well, but would just sit and wait for you to click a button.
    Ed
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
    Attachments:
    sample.vi ‏27 KB

  • Confirmation required about case structure in cursor

    Hi,
    I have been trying to use a case when structure inside a cursor in a stored procedure with regular expressions in it, but its throwing compilation error.
    The error message does seem to be irrelevant.
    Just want to know whether there is any limitation of using case when structure inside a stored procedure in a cursor.
    If no limitation like that, then will try again to debug it.
    -MD

    Manas Datta wrote:
    Hi,
    I have been trying to use a case when structure inside a cursor in a stored procedure with regular expressions in it, but its throwing compilation error.
    The error message does seem to be irrelevant. No it is not. The error message will tell you what oracle or the compiler thought what is wrong. Try to understand it.
    Just want to know whether there is any limitation of using case when structure inside a stored procedure in a cursor.
    If no limitation like that, then will try again to debug it.
    -MDBe aware that the syntax of the case statement is slightly different beween SQL and PL/SQL.

Maybe you are looking for

  • Slow network while running Archlinux

    Hi there, Recently (and, that's the weirdest part, recently only) the network have been really slow. From what I see when I'm running Windows, I assume I actually only get a fraction of the speed I should get when I'm running ArchLinux. For instance,

  • HT4796 how long should it take to transfer this material from a PC to my Mac?

    How long should a data migration from a PC to my Mac take?

  • Customer receivables Aging report was changed

    When try to generate the SAP Standard Report Customer Receivables Aging, supprised to see that the column has been changed. The first column was the Future Remit, second column is the 0-30 aging, third column is Customer name. I chcek if the Form set

  • Question about Performance Operators

    Hello friends... I have a doubt, can anyone help me? whats the bes operator for good performance ? select... from... where ID IN (a,b) or select... from... where ID =a or id=b Tks

  • Practical limitations to user defined table

    Hi all, I am thinking of setting up a user defined table which will have 5 columns and around 45,000 rows.  It will be used in a simple formatted search to retrieve the value in column 5 when the values in columns 3 and 4 match an item code and an in