Variant to Data question

This is a LV6.1 question. For an application I'm debugging, flatten data is
being used on a menu ring control. The menu ring data is unflattened using
Variant to Data. What I get back from the unflatten process is the numeric value
of the menu rings index, which is what I would expect, no problem there.
What I'd like to also get back from the unflatten process, would be the
string array of names for the menu ring that was flattened. Can someone
suggest how I can do this?

The data is only the number of the element chosen (a blue wire) and not any more data about the element. To get the list of strings you should use the Strings[] property node. Then, you can flatten and save that array.
Another option is to pass (or obtain) the reference to the ring to whereever you're using it and then use a property node to extract the data you need.
A third option is to use an enum which keeps the data inside the wire, but that means you will need to have the exact same enum on the other side (which means it probably won't help you). You can do this by making the enum a typedef.
What are you trying to accomplish?
Try to take over the world!

Similar Messages

  • Variant to data: Need info regarding type of data

    Hello,
    What I want to do is very basic. I will acquire the image using CCD camera. The
    image is a raw data type: 2D array of type long (4 bytes per element) or integer (2 bytes per element). I can save the image even as .tiff file. Using Variant To Data, I am converting the image so that labview can handle it (I am not sure whether I really need this) before I write that data to some file and save it. I have to define data type for Variant To Data. I tried to define the data type. However, I am confused. Would anybody give me some suggestion?
    Thanks a lot,
    Dushyant

    Hrm, you'll need to be more specific about your actual question in order for us to give you a good answer, but, without more information, I'd say you should just define the type as a 2-d array of either longs or words. (i.e. get an array constant, place a numeric constant inside of it, right click the numeric constant, and select Representation->Long or Representation->Word then wire the constant to the Type input of the Variant to Data).
    If you're dealing with variants, I'd guess you are probably calling an ActiveX control or server to communicate with your camera?
    Regards,
    Ryan K.

  • Create a production order with variant configurator data

    Hello,
    Can anyone tell me the way to create a production order with variant configurator data. Is there a BAPI ? an IDOC ?
    Is there several steps ?
    I have to create an interface which creates automatically PP orders. The data input is a file.
    Thanks for your help

    Hi,
    There are fews BAPI's available for creation of Production Order. They are:
    BAPI_PRODORD_CREATE
    This bapi will suit to your requirement, as input will be provided from file.
    Others are
    BAPI_PRODORD_CREATE_FROM_PLORD " this converts planned order to production order
    BAPI_PRODORD_CREATE_FROM_REF      " this creats production order considering other production order as reference.
    Hope your query is answered.
    Regards,
    Brajvir

  • Difference between "Database Variant To Data" and "Variant To Data"

    Can anyone tell me the differnce between the 2 VI's "Database Variant To Data" and "Variant To Data"?
    I am using the database connectivity toolset and making a query.
    I have tried using both, but the give me the same result.
    Attachments:
    Variant to Data.JPG ‏45 KB

    You won't see a difference between these two functions with just a string or other simple data types.  Where you'll see a difference is with clusters and more complex data types that come from the database.  The variants returned by databases can be slightly different than the standard variant.  That is where the Database Variant To Data is needed.  Otherwise, if you are just reading string information, either function will work fine.
    Crystal

  • Database Variant to Data.vi not working for the Date datatype with LV 8.2?

    I'm moving a large body of LV database code from LV 7.1 to 8.2 and find that the Database Variant to Data.vi is not working correctly when used with the Date datatype. It works fine with 8.0, and the common Variant to Data works also. Am I missing something? Thanks in advance for any assistance. Wes

    Thanks for the prompt reply Crystal,
    The data is stored in an Oracle database using the DATE type. I'm querying many rows along with other columns and converting each of the values as necessary for each column with the 'Database Variant to Data' vi. Only conversion to Timestamp is no longer working as of version 8.2. I recognize that plain Variant to Data works but I have many (100's) of VIs to change if that is the only solution (not the end of the world). Most often the dates are originally generated in the database using PL/SQL procedures calling SYSDATE which look like: 5/1/2006 11:56:26 AM (in TOAD anyway) which I then need to read into LV as type Timestamp.
    Regards, Wes.

  • Dynamic Variant for Date Range

    Making the Variant for Date or Date Range Dynamic in the Selection Screen of any Program.
    There are actually many ways you can make the Variant for Dateu2019s Dynamic.
    1.     Providing he Values in the Variant Variables.
    2.     By creating the variables in the table TVARVC
    3.     By Initializing the values in the program itself.
    I saw many posts with respect to these and found that everyone has their own way of dealing. Even I wrote code in the program initialization to get this done.
    Here in this post I am showing you the easiest option which is available in the Variant creation.
    EX : If you want to execute the batch job based on a date range.
         SY-DATE u2013 60 days , that means always your program should execute the batch job based on System Date. And the variant should change accordingly.
    Following are the step by stop to do that.
    1. Select your program and select the Variant Radio button and then Click on Display.
    2. It will pop up a screen with variant option below the program name.
    3. Enter the Variant name and click on Create
    4. You will see a screen, with the Attributes button.
    5. Once you click on the Attributes button, it will take you a screen with selection option.
    6. In my scenario my input is based on Calender Day, so select the Selection Variable for Calender Day: You will find 2 options T & D.
    7. Select D: Dynamic date Calculation, then select the Name of Variable (input using f4). You can find many options.
    8. Scroll down the Variant Attributes and select current date u2013 xxx, current date + yyy
    9.Though it seems to be inactive, just double click on the row to provide the date range.
    10. Just enter the value for xxx and yyy to get you dynamic range based on number of days
    11. In my scenario I have to consider System Date u2013 60 days. 0 means current day.
    12. Click on OK to check the range has been reflected or not. Then save the Variant and check the value by executing the program with saved Variant.
    You can check the same in blog with all the screen shots attached but this thing is so easy you don't require screen shots.
    Regards
    Shankar Chintada

    Hi Shankar,
    It would be great if you can put this information in Wiki .
    Pravender

  • Labview How to specify 1d array of clusters as data types for variant to data

    Hi, I'm new to labview. Can anyone tell me how to specify 1d array of clusters as data types for variant to data?

    First of all, you should be sure that there is such a data type within the variant; otherwise, you will run into errors.
    I recommend you to create the cluster and create a type definition from it. Then drop an array shell from the array palette and drop the cluster type into that array.
    Connect that constant to the data type input of the Variant To Data function.
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • How can I embed Variant To Data in a subVI and pass in the Type input?

    If I use Create Control on the Type input of Variant To Data, I get an undefined type error unless I insert a control of a specific type into the cluster control that was created. This seems to prevent passing a parameter into a subVI for this purpose.

    > I'm interested in extending the functionality
    > of Variant to Data, such as using it or not based
    > on an additional input. Clearly, LabVIEW will not
    > allow this with the current design.
    I do not see what you mean by "using it or not based on an additional input". What would the output of this function be, if it were "not used"? What exactly are you trying to do?
    Personally, I have long wanted a polymorphic data type. If a polymorphic control were connected to a VI's connector pane, it would be defined by the calling VI. Once a calling VI wired a data-type to a polymorphic input of a subVI the type would propogate into the subVI.
    > As to the existing documentation on the type data
    > returned by Flatten to String, I find it
    rather
    > incomplete.
    With the release of LabVIEW 7, NI has updated App Note 154 to include some more data types (and subtypes). If you haven't seen this, I suggest you take a look.
    > I have created many types that cannot be decoded
    > using the available documentation. This alone,
    > makes an analytical solution difficult.
    Do you mean compound data types like clusters and arrays? Almost all data types can be decoded just fine with the available documentation. The only types that are not very straight-forward are the waveform data type, refnums, and typedefs. If you give me an example, perhaps I can help.
    > Adding
    > LabVIEW version dependency really makes this
    > solution fragile.
    I don't agree. LabVIEW may add new types in new versions of LabVIEW, but fundamentally the typecodes and structure of flattened LabVIEW data types have not changed at all (even though NI does reserve the right to change this in future releases of LabVIEW). Do have specific examples of t
    his?
    Cheers,
    -Jim

  • How Variant Configuraton data  from Sales Order stored in the database

    Hi,
    I understand that the "variant configuration" data (chosen values for each characteristics assigned to material) from a sales order is stored separately with reference of an object in SAP.
    Please let me know how SAP stores such data -source in the database tables.
    This is required to draw a report of these charateristics values for various sales orders (Transactional data).
    I also understand that there are function modules to retrieve this data, but the function modules are unable to retrieve data as accurately as the VA03 program.
    Thank you for your advice.
    Regards,
    Hemant

    Hi ,
    I do not know what a reference charactersitcs is,but there are all independant characeristics in terms of their values.
    A guess it is because the VC data is changed after the sales order is created, the updated VC data is displayed properly only in VA02 or VA03 but other function modules fail to display the updated VC data.
    I understand there is a relationship of instance -between sales order object and VC data object-which we need to update and then see the latest data.
    Please let me know if anyone has debgged VA03 to know how the standard SAP program retrieves VC data in a sales order.
    Thank you,
    Hemant

  • Decode variant data w/o using 'Variant To Data' function.

    I need to decode variant data w/o having foreknowledge of the type used to create it. That is, I'm using the 'Flattened String To Variant' function which gives me the info I need, but it's all contained within one indicator. I need some way to break this info down into its constituent elements.
    For instance, let's say I have the flattened data and type descriptor from a cluster with two elements, a boolean and a string, but not the structure itself. Passing this flattened data and/or the type descriptor into a function, I would get a 2D array (or the like) as output containing the name of the boolean (its label), its value, and the name of the string and its corresponding value.
    There must be a way to
    do this, and I suspect it's been done already, but I can't find any reference to it.
    I have attached a file named Test.vi which demostrates this problem.
    Remember, even though I know the name of the control, I won't know the type, so I cannot use the 'Variant To Data' function to deference these values. I can make ready use of DLLs, CINs, or LabVIEW code for the solution.
    Thanks ahead of time for any help! Greg
    Attachments:
    Test.vi ‏26 KB

    You might be able to take advantage of the Variant to Flattened String VI from the Advanced>>Data Manipulation>>Variants pallette. This VI converts a Variant to a flattened data string and a type descriptor. The type descriptor is explained in ap note 154. You might be able to create a VI that would parse data from the flattened data string using the type descriptor. You might have to represent each piece of data as a flattened string to work around the data flow issues in LabVIEW.

  • Save variant configuration data with BAPI or FM

    Hi experts,
    I created a PP production order by using a configured material.
    I can see internal object number in table AFPO-CUOBJ.
    I'd like to change and save a value of characteristics by using ABAP.
    Could you tell me it if there is a BAPI or FM to save values of characteristics in variant configuraion?
    BR,

    you can chnage the variant configuration data using below bapi with strcture    order_cfgs_value      =
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
        EXPORTING
          salesdocument        
          order_header_in       =
          order_header_inx      =
           TABLES
          return                = return_lt
          order_item_in         =
          order_item_inx        =
          partners              =
          partnerchanges        =
          partneraddresses      =
          order_cfgs_ref        =
          order_cfgs_inst       =
          order_cfgs_part_of    =
          order_cfgs_value      =

  • Dynamic Variant for Date filed

    Hi All,
    I need to create a dynamic variant for date fields for standard report.
    in date Low field...value will be harcoded as '01.01.2011' and S_Date-high date field should be current date - 1.
    I dnt want to go for code in report to handle this.
    I tried with many option but could not able to see up the dates like as above.
    Kindly help.
    Piyush

    Hi,
    try this code
    data prevday like sy-datum.
    SELECT-OPTIONS s_date for sy-datum DEFAULT '20110101'   .", sy-datum-1.
    INITIALIZATION.
    AT SELECTION-SCREEN OUTPUT.
    *  S_DATE-HIGH = PREVDAY.
      prevday = sy-datum.
    s_date-high = prevday.
    modify s_date index 1.
    Hope the help
    Edited by: j.ortiz on Jan 27, 2011 3:01 PM

  • Variant to data boolean

    Hello everybody,
    I want to convert a variant data  into boolean. I use the Variant to Data control, but in order to extract the boolean data, I assume, I need to provide it with the type of the data I want this conversion to be performed (boolean, that is). There 's a terminal to do so, but I don;t know whether I should use a constant (what's the numerical constant for the boolean type) or what sort of boolean constant I should link the terminal with? Shortly, I don't know what I should link it with.
    THere's an enclosed picture coming with the post.
    Thank you,
    Dana
    Attachments:
    cannot wire_different data types.JPG ‏111 KB

    Hi JB,
    I tried so, and doesn't work.
    In essence, I have 12 cases frames, and I want them linked to the same Stop button.
    I have the code attached,
    Thanks for the idea.
    Dana
    Attachments:
    Acq_multiBS_statemachine_sound_int.vi ‏134 KB

  • Database Variant to data not working when converted from LV 2010 to 9

    Hi all,
    I have a simple code which i made in LV 2010 for displaying data from an MS access sheet into an array in which i used the DATABASE VARIANT TO DATA tool. But when i converted this file into an LV 9 VI and opened it in another computer running with LV 9 , the wires connecting the data terminal of SELECT DATA tool and DATABASE VARIANT TO DATA tool are broken. Error message is Type 1 is 2d array and type 2 is void. Opening the same converted file in LV 2010 doesn't give any error and is running fine.Can anyone please tell me what should i do to rectify this problem.
    Regards,
    Nitzz. 
    Solved!
    Go to Solution.

    Hello Barrette,
    Could you please post an example of selecting a table from the database (access) using the Select from Database tool and then displaying it to an LV indicator. I have posted an example of what i am trying to do, but i am getting an error.
    Any kind of help would be appreciated.
    Regards,
    Nitzz
    Attachments:
    Untitled 2.vi ‏19 KB
    New Folder (2).zip ‏20 KB

  • Custom ATP Check using Variant Configuration Data in sales order

    I have a requirement to modify the standard SAP ATP check by including the variant configuration data entered on a item.  Standard SAP does not use/include the characteristics data when doing the ATP. None of the available user exits would allow me to do this.
    The scenario is the client has a configurable product that exist in inventory as one item, base unit as IN2.  The batches that exist in inventory have the characteristics of width and length.  The order data specifies a width and a length, they need the ATP to identify the availability based on the characteristics of the batch.
    The solution was to present the user with a list of batches based on the characteristics that meet the criteria.  The user would then have the option of choosing one of the batches which would mean that the line item would include the batch #.  If the user does not want any of the batches, they could choose to select a Make to Order option, which would change the item category of the item, so that it creates a production order upon saving the order.
    The problem I am having implementing this solution is I have not been able to identify the internal table(s) that contains the characteristics data in SAPMV45A after the configuration screen is called.  If anyone knows where that information is during the sales order processing, it would be greatly appreciated.

    Hello Jean,
    Have you managed to find a solution as yet? I know you have not received any replies but am hoping you were able to resolve the problem as we are facing the exact issue on our project.
    Please let me know,
    Thanks,
    Tanya

Maybe you are looking for

  • Error reading from file glibc-2.5-24.i686.rpm RHEL 5 Setup stuck at 80%

    Hi, I am installing Oracle 10g on RHEL 5 (Red Hat Enterprise Linux 5) machine I am facing two problems 1) while installing the rpm packages the following package gave an error Error reading from file glibc-2.5-24.i686.rpm 2) I still gave a try to run

  • Column icon in top bar grayed out

    Created a doc from "basic" template, and can't get the columns icon in the format bar to work. Always grayed out. Anyone know what I should do? Thanks

  • SoundLogic Telescopic Lens attached to the iPhone

    My Wife just bought me the SoundLogic iPhone Telescopic Lens with the detachable case and Tripod. A fun little Valentine's Day Present. Of course I've been testing this lenses ability & I've found that while the box claims it is an 18mm lens it seems

  • Colors change

    Hello to everyone, Sorry for my english, I'm from Italy. I've this problem with colors in FinalcutPro or maybe in QuickTime. I open a Jpeg graphic file in Photoshop with sRGB color profile. It look blu/violet. I open the same file in FCP and it look

  • Bill to adddress in PO

    Hi, In one my the user's purchase order when we click on print preview we have a section called please bill to which contains the billing address. In this case why is the section not appearing? while other sections like vendor ,deliver to appears cor