Access fields in a Rowtype variable

Hello!
Is it possible to access dynamically to the fields of a rowtype variable?
For example, I have the following code :
CURSOR cursorName IS
SELECT field1, field2,field3, ..., fieldN FROM myTable;
myVar cursorName%ROWTYPE;
myString := myVar.field1 || ';' || myVar.field2 || ... || myVar.fieldN;
Is it possible tu use a collection such as :
For each field IN myVar
myString := myString || field;
Next
Many thanks for your answers!

If the class you specify in the .NET adapter has public properties or fields then it should let you do "Get Property". Make sure the fields are really public and that you have the right class specified for the objects you are accessing.
Basically, if you are storing the objects in a teststand object array, then the elements of the teststand object array are already the same as the elements of the dotnet array. You can just loop based on the number of items in the array and make calls by specifying Locals.myarray[Locals.i] as the class object (for example) when you specify the .NET step inside the loop. Be sure to uncheck the "Create object" checkbox as you want to use the object you are specifying by expression rather than creating a new one.
Hope this helps,
-Doug

Similar Messages

  • How to Assign a Field value to a Variable??

    Dear All,
    Kindly let me know, if <b>"HOW TO ASSIGN A FIELD VALUE TO A VARIABLE????"</b>
    Situation is, we have a Field (OBJK-TASER) in which 2 tables (SER01 & SER03) are stored. And we want to access names of the Tables which are there in the field(TASER) in  (OBJK) table  to a variable and then passing that variable to the sql query as a table name to get data accessed dynamicaly.

    try this
    select TASER from OBJK into table it_table.
    loop at it_table.
    select field1 field2 from (it_table-table) into table it_fields.
    endloop

  • Access field value in ALV

    Hello experts,
    I have created an simple ALV Grid report, in that I have implemented double click event n I want to create a new ALV grid with new data to be displayed. So I want to access field value ie using SLIS_SELFIELD or anything. Could anyone please guide me how can I access a field value using slis though SLIS_SELFIELD has methods like SEL_TAB_FIELD... I wan to access something like SEL_FIELD_VALUE but its not available in the class.
    Thanks in advance...
    Regards,
    Viral Patel

    Hi Viral,
    SLIS_SELFIELD has an attribute named VALUE which holds the value you selected row & TBAINDEX holds the row number.
    Refer below code snippet :-
    FORM user_command
              USING s_ucomm LIKE sy-ucomm
              s_selfield TYPE slis_selfield.                    "#EC CALLED
      CASE s_ucomm.
        WHEN '&IC1'.
          CLEAR wa_podat2.
          READ TABLE itab_podat2 INTO wa_podat2 INDEX s_selfield-tabindex.
          CHECK sy-subrc = 0.
          IF wa_podat2-ebeln = s_selfield-value.
            SET PARAMETER ID 'BES' FIELD wa_podat2-ebeln.
            IF wa_podat2-ebeln IS NOT INITIAL.
              CALL TRANSACTION c_tcode.
            ENDIF.
    For above event to happen, you have to use parameter I_CALLBACK_USER_COMMAND of  REUSE_ALV_GRID_DISPLAY as below :-
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program      = l_repid
          i_callback_user_command = 'USER_COMMAND'
          it_fieldcat             = itab_fieldcat
          it_events               = itab_events
        TABLES
          t_outtab                = itab_podat2[].
    Regards
    Abhii
    Edited by: Abhii on Nov 30, 2009 11:25 AM

  • How can I pass a value field to a global variable?

    I have a doubt,
    I wnat to know if is possible to pass a value field to a global variable inside of DataFlow?
    That a try to do is at the time to execute a JOB on line (real time), depending of the value field that i receive, only certain DATAFLOWS will be executed  depending of the value field.
    I hope you can help me.
    Kind regards!!!

    It can be done via various ways, your approach is kind of odd, though.
    You are saying you have one kind if Input message, depending on the flag you want to do different transformations. The way you envision that is by loading that flag into a global variable and use different dataflows then.
    Can you use different dataflows within one Realtime Job? Yes, usually the first loads an in-memory datastore.
    Can you write into a global variable? Yes and No. Not directly, but you can write the value into e.g. a database and using the sql() function read it from there. But why would you. You could write it into the in-memory datastore. And then you run your n dataflows, each has a filter. So only one of these dataflows will actually process the data.
    Are there other approaches? I would have a Case transform at the beginning and route the data into different queries depending on the data. So all in one dataflow. Your approach is fine for a batch dataflow where a dataflow is started, does something and then ends. But that's not how it works in Realtime!

  • Bind input field value to a variable fails

    Business need : The user wants to re-evaluate lines by a percentage value which he fills via his BI-IP screen.
    I created an INPUT FIELD in WAD and I am trying to link a variable value (initially created in BI-IP through transaction RSPLAN)
    to this INPUT FIELD.
    Whenever I fill the input field with a value, the value is not being transferred to the variable.
    Please help how to bind an INPUT field value to a variable to be transmitted to a planning function.
    I have made many trials but in vain.
    Please help.

    Hi.
    I will present my scenario (it works in my system). From this scenario you may "cut" implementation for your scenario.
    Lets sat I have an input fileld item and I want to read value (in my case numeric value) and pass this value to any planning sequence.
    1. Create in Bex variable (in my case it is formula variable) lets say Z_INPUT_VAR
    2. In WAD, when you executin planning sequence (lets say by pressing button execute) in command EXEC_PLANNING_SEQUENCE_SIMPLE define data binding.
    When you clicked data binding->variable input MANUALY your variable name (Z_INPUT_VAR) in popup window.
    3. In variable type select (ITEM_INPUT) type
    4. In web item select your input field item.
    This way you will pass inputed value to vaariable and planning sequence.
    Then in planning function you also may use VARV() to read value of Z_INPUT_VAR variable.
    Regards.

  • How do you synchroniz​e accesses to a LabVIEW Shared Variable?

    I would like to create an ad-hoc weather station program (I'll explain more in a bit).  I am using LabVIEW 8.0 Full Edition, and I would like to share data over a network between stations with the LabVIEW Shared Variable.  Here's what I want to be able to do:
    A node would start up, and begin publishing data to a network via a shared variable.
    The shared variable is an array of clusters
    The cluster information would hold things like:
    Station Name
    Station Location
    Weather information cluster (temperature, rainfall, windspeed, wind direction, etc...)
    Timestamp of last update
    When a new node would like to enter, it would bind to the shared variable, grow the array, and add its information.
    If a node's Station Name and Station Location is already in the shared variable, it would merely update the information in the cluster.
    Viewing nodes could pop in, bind to the shared variable, and read/display the information at any time. 
    I am trying to enumerate problems with this before implementing, and I have run into a stinker of a problem that I am not sure how to solve.  How do I synchronize accesses to the LabVIEW Shared Variable?  If I read the variable, modify it, and write it back, I will undoubtedly run into a race condition where 2 nodes attempt to update its data and I will lose the data written by the first node - Node A reads, Node A modifies, Node B reads, Node A writes, Node B Modifies, Node B Writes, and thus the modifications made by Node A are lost.  In my specific application losing some data isn't critical, but if not remedied this type of problem could cause massive amounts of data to be lost when there are numerous nodes, and that is definitely not acceptable. 
    Does anyone have any recommendations on how to synchronize the read-modify-write operations on the data in the Shared Variable?
    -Danny

    Wendy,
    I am afraid Semaphores are not network-shared objects (to my knowledge), they are system-level objects that use operating-system synchronization mechanisms.  If I were synchronizing on a single machine, a semaphore might be a valid mechanism; as an aside, most user-mode semaphores are designed to synchronize within a single process - to synchronize between processes you need to store the semaphore in the Kernel, and to synchronize over a network you would need a network node to handle serialization of requests.  My Shared Variable is published over a network, and to my knowledge there are no network-published synchronization mechanisms available - mostly because there is no way to currently perform an atomic test-and-set on the Shared Variable (am I correct?) and there isn't a mechanism for blocking access to a Shared Variable from another network device/machine (or is there?).  I've been looking for some way to implement an atomic test-and-set but I am running into a wall; I know that if I select the "single writer" attribute of the Shared Variable I can get LabVIEW to force a single writer allowing me to have an atomic "set", but I need more than that.
    If only there was a network-shared Semaphore or some way to block other network accesses to the Shared Variable I would be in business - something like what I want doesn't exist, does it?
    Thanks!
    -Danny
    Message Edited by texasdiaz on 02-23-2006 02:52 AM

  • How to access the Custom Data type variable given in Expression edit control To and From LabVIEW

    Hello, I would like to know how to access the custom data type variable given in the Espression Edit Control from LabVIEW and vice-versa
    Say, the FileGlobals.Reference_Handle (Custom Data Type Variable) contains the
    VISA I/O session (Which in turn contains VISA_DeviceName: String, Session: Number),
    Channel1: Number and
    Channel2: Number
    I am expecting the user to give FileGlobals.Reference_Handle as the input at the ExpressionEdit Control in the edit screen of the VI Call.
    I would like to know how to get the values of this custom data type to LabVIEW?
    Say, if I have the Cluster in LabVIEW like VISA I/O session (Deive Name and Session Number), Channel1 and Channel2
    how do i need to set this cluster to the Custom Data type variable in TestStand?
    Thanks and Regards
    Prakash 

    Hi,
    TestStand to LabVIEW: i didnt understand what you r trying to achieve. But if you are using references, Use Property nodes and Invoke nodes to achieve what you want in LabVIEW.
     LabVIEW to TestStand: check the image below: You need to click the button next to 'container'. I have used a cluster output in the VI.
    Hope this helps
    .......^___________________^
    ....../ '---_BOT ____________ ]
    ...../_==O;;;;;;;;_______.:/
    Attachments:
    1.JPG ‏187 KB

  • Using specifc partner function as access field for pricing

    Hi all,
    i am planning to add a specific partner function as an access field in combination with the material with which i will maintain the condition record & i want this condition record to be fetched for my respective condition type.
    i did the following, i still dont get the value.
    copied the new field in the KOMK table (structure & activated it),  assigned it to the relevant access sequence & hence to the condition type, i still dont get the condition record value ( condition record is a valid one too).
    what am i missing here?

    Hello,
    Go to Sales Order - Item Detals - Condition Tab & Click on "Analysis". Here check the Accesses & whether system has found the Condition Record.
    Also, as mentioned by Ankur above, most probably the new Partner Function or either of the Accesses will not be prosent in Sales Order.
    Hope this helps,
    Thanks,
    Jignesh Mehta

  • Using table field name as a variable

    Hi ,
    Is it possible to map some values to a field in a Ztable , if I have the field name of the Ztable in a variable.
    For ex:
    I have a ZTABLE -- which has some fields - ZF1 and ZF2.
    In my code, I determine the field in which I want to put data at runtime. For ex, in my code i determine at runtime I want to update field ZF2 , but I have this field name in a variable <V_FIELDNAME>
    So, Is it possible to do something as:
    <V_FIELDNAME> = ZF2.
    ZTABLE-<V_FIELDNAME>    =    <VARIABLE -SOME VALUE>.
    and this value should actually maps to ZTABLE-ZF2.
    If it is possible , how to do it ?
    Thanks-

    Hi Tamas,
    Thanks a lot for ur post ! it did certainly help. However, I need some more help.
    Here is what I need -
    I will have a string coming up from an interface which would be something like : Val1;Val2;Val3
    And in SAP R/3 I have a variable maintained as : Field1;Field2;Field3
    Field1 Field2 and Field3 are fields of a ZTABLE.
    So , at runtime, using the variable I have to determine which Value goes to which field and then insert this field in ZTABLE.
    So, ultimately , code should perform the following actions:
    ZTABLE-FIELD1 = Val1
    ZTABLE-FIELD2 = Val2
    ZTABLE-FIELD3 = Val3
    Insert ZTABLE.
    Going by code you provided, I can assign individual values, But then ultimately I need to map it to a structure which can be used to insert in a DB table. How can I do this?
    Thanks-

  • How to read the input field value into ABAP variable?

    Hi All,
    i need a read the value of an input field into an ABAP variable,and i am doing this in the following way
    lstring = request->get_form_field('myFlag').
    here 'myFlag' is the input field name,but this is not returning me any value into lstring.
    I have gone through the SDN and tried to do this.
    could you please help me out to resolve this issue.
    Thanks in Advance,
    Praveena

    Dear Praveena
    In which event are you putting this code. Place it in oninputprocessing event(Page with flow logic Model of coding). Then it will surely work.
    Regards
    Vijay.M

  • Show or Hide fields based upon a variable value

    Hi,
    I am a rookie in the field of Acrobat. And my only question is :
    How to Circle a Form Field based upon a variable value .
    For example, If x=1, I want to circle Japan and if x=0, I want to leave it without any change.
    Please help me out. Thanks for your time and help.
    Thanks,
    Vijayvijay77.

    Hi George,
    I am pre-populating a Pdf file based upon the data submitted by the user. And I have to circle options selected in the form.
    I am writing coldfusion code to flatten, populate the form into a PDF form. The end result is the PDF generation with all the data in it.
    The data comes from the database, where I set variable values if any is selected or not.
    Thanks for your reply, I really appreciate your help.
    Vijayvijay77.

  • INSERT using a %ROWTYPE variable

    In PL/SQL I need to "copy" a row in a table, changing the sequence number in a key and changing a couple of other columns. Most of the 20 or so columns are unchanged. I declare a variable using %ROWTYPE, to hold the entire row, and do a SELECT into it. Then I change the 3 columns, and want to do an INSERT, using the %ROWTYPE variable. But it seems that INSERT does not let me do this - I have to specify all the columns individually. This is tedious, and also means I have to know all the columns, which is bad for maintenance (new columns added in the future). Is there a way to INSERT the entire row? Whay does Oracle not allow this?
    Dave E. at McGill Univ.

    Oracle will allow this....but in Oracle9i and after. Right now you cannot do this in Oracle8i or less.
    Gio
    null

  • Select values from table%ROWTYPE variable into a cursor

    I have a stored procedure which has an OUT parameter of table1%ROWTYPE.
    In future we might have to add more OUT parameters of table2%ROWTYPE etc. But at any point of time only one will have values.
    So instead of having table%ROWTYPE as OUT parameter, can I send these single row ( with variable values) in a cursor, so that declaration part atleast will not change.
    Is it possible to select values from table%ROWTYPE variable into a cursor.
    cursorOUT IS
    SELECT * FROM varREC;
    where varREC is table.ROWTYPE variable.
    Or which is the better solution in this situation.
    Thanks.

    SQL> var a refcursor
    SQL> declare
      2   bb emp%ROWTYPE;
      3  begin
      4   select * into bb from emp where rownum = 1;
      5   open :a for select bb.ename ename, bb.empno empno from dual;
      6  end;
      7  /
    PL/SQL procedure successfully completed.
    SQL> print a
    ENAME                                 EMPNO
    SMITH                                  7369Rgds.

  • Can JVM security policy be modified to access field values of private field

    Can JVM security policy be modified to access field values of "private" field in a Class?

    See http://developer.java.sun.com/developer/onlineTraining/Programming/JDCBook/appA.html#ReflectPermission.
    Note that you will have to use reflection to access the fields once the security policy allows you to supress the access controls.
    Chuck

  • Newbee: How to access fields with duplicated names?

    How can i access fields where the name already exists (Like FieldName[0], FieldName[2],...) - and where else can i get answers to simple questions like this one?
    Fieldname[n].thisValue does not work.
    Thanks for help.

    xfa.resolveNode("FieldName["0"]") etc.. I think should work

Maybe you are looking for

  • Web service scenario -- message stuck in receiver PI engine

    Hello expert I have scenario HTTP --> PI --> WS (ABAP backend). I have PI 7.1 and the backend is based on NW 7.0 I have configured the scenario in ID with receiver agreement of ws adapter. In the backend, I've generated the server proxy based on the

  • Reg: Script Output in PDF form

    Hai.. Can anybody tell me how we will get script output (P.order output) in PDF format and we need to downlaod this PDF to our local drives. plz tell me the function modules to be used for this requirement and paste the code if any of you worked on t

  • Photoshop CS6 make downgrade to CS5.5 ?

    THE PRODUCTS ADOBE CS6 MAKE DOWNGRADE TO CS 5.5 ? THANKS!

  • Video formats and resizing

    Hi All, Before emabrking on a further iTunes ugrade I was wondering whether anybody knows whether iTunes will import video into itunes like it does music. That is, will it take a mpg file or avi and convert it to mov/mp4 thatit can deal with. Also wi

  • How to fix corrupt keychain permissions?

    My keychain permissions have been corrupted. Anyone know how to fix this? Keychain First Aid as well as repairing disk permissions didn't help. What I have also tried, though without success, is starting up from the recovery partition and repair both