Proper way to pass a structure as FORM parameter

Folks,
I need to pass a table that is of type LISTZEILE to a subroutine.
form mytest using myTable LIKE LISTZEILE.
loop at myTable.
  write: / myTable.
endloop.
endform.
Syntax checker flags this declaration as an error. Can someone please suggest me the right way to declare this?
Just some background info. This subroutine is invoked from a custom RFC:
FUNCTION Z_MYRFC.
""Local Interface:
*"  IMPORTING
  blah
*"  EXPORTING
  blah
*"  TABLES
*"      RETURNTABLE STRUCTURE  LISTZEILE
perform MyTest using returntable.
blah.
endfunction.
Thank you in advance for your help.
Regards,
Peter

hi,
try this..
PERFORM mytest TABLES <Table name>.
FORM mytest TABLES < table name >STRUCTURE listzeile.
  " wriite your code here
ENDFORM.
hope this helps
Regards
RItesh J

Similar Messages

  • Proper Way To Pass Variables

    I know this is a basic question but it seems there are several different suggestions on how to do this. So using AS3 with Adobe Flash CS4, what is the correct way to pass a variable from a server side script "PHP" to my SWF?
    Thanks

    var urlLdr:URLLoader =  new URLLoader();
    var urlVar:URLVariables = new URLVariables();
    // add data to be sent
    urlVar.data1 = "whatever";
    urlReq.data=urlVar;
    urlReq.method="POST";
    // listen for data return
    urlLdr.addEventListener(Event.COMPLETE, phpCompleteF, false, 0, true);
    // call php
    urlLdr.load(new URLRequest("yourphp.php"));
    function phpCompleteF(e:Event) {
    // i'm not sure everything needs to be "typed" but, it's prudent to do so
    var vars:URLVariables=new URLVariables(URLLoader(e.currentTarget).data);
    // vars contains your return data

  • Proper way to pass 'this' to an anonymous listener

    I have added a button to copy some information to the clipboard. Instead of a class-level actionPerformed() method I am using an anonymous listener:
         JButton jb = new JButton("Copy QE");
         jb.setBackground(bgc);
         jb.setForeground(Color.lightGray);
         jb.setToolTipText("copy the information below to the clipboard");
         final HelpBox that = this;
         jb.addActionListener( new ActionListener() {
             public void actionPerformed(ActionEvent e) {
              StringSelection ss = new StringSelection(that.toString());
              Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard();
              cb.setContents(ss, SIHwheel.logBox);
         });It seems to be working fine. I am wondering, though, is the final declaration of that the proper way? Is there a better overall methodology?

    A common approach is to encapsulate the logic into a method on the enclosing class. Then, the listener would just call the method:
    private void someMethod() {
      // init the JButton...
      jb.addActionListener( new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          updateClipboard();
    private void updateClipboard()
      StringSelection ss = new StringSelection(this.toString());
      Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard();
      cb.setContents(ss, SIHwheel.logBox);
    }

  • How to pass a Structure as input parameter

    Hello,
    Anyone knows how to instanciate, populate and pass a Structure into RFCInvoke?
    Thanks!

    Hello,
    Please take a look at the documentations of netweaver RFC programing in this blog: 
    /people/ulrich.schmidt/blog/2008/11/08/new-developments-in-netweaver-rfc-communication
    It contains useful information of rfcInvoke.
    Kind regards, Istvan Elek

  • How can i pass parameters to every form sucessively or repeatedly

    How can i pass parameters to every form sucessively or repeatedly
    Eg: I have username which is specified in first form
    I want to display and use the username in each and every form after that form
    please tell me how to do
    i have one solution
    i.e., Normal way to pass parameters from one form to another!
    Is any procedure to pass paramters to all form at a time???

    excellent ...
    thanks for adding up to my post ..
    You can make use of parameters
    Every forms shud have same parameter name and u pass on the values of these
    Its one of the best ways

  • Best way to pass vars from html into flash?

    I've read a variety of pages that describe how to pass a variable into a flash movie (AS3, player = v9) from the html in which it is embedded.  This page describes AS3 but neglects to mention what to do with the object and embed tags in the noscript section. Furthermore, I'm not sure the javascript I see generated in my page looks like the example there (the js in my page doesn't check AC_FL_RunContenta against zero).  This page is quite long and appears to deal mostly with AS1 and AS2 approaches which I have used before and neglects entirely the newish javascript approach which appears to be used to embed flash these days (i.e., the javascript function AC_FL_RunContent).
    I was wondering if someone could spell out the proper way to pass in a variable from HTML so that flash can see it in such a way that works even if javascript is disabled, in all browsers, etc., etc.
    I've attached the HTML generated by the Flash IDE to this topic.  Any help would be much appreciated.

    You'll have to search for that concise and thorough list of steps or figure it out using the information you now have, which is sufficient to get it done.  It's not that hard--add the FlashVars in the embedding code in the three places and use the various examples you have links to to add the code in the Flash file to access and use the FlashVars.
    Your Flash will be embedded in a web page depending on the visitors settings... if they allow javascript then the javascript portion will be used.  If they don't, then either the object or embed sections will be used depending on their browser.
    As far as javascript changes go, don't sweat 'em until you have a problem... use whatever code your Flash-created html page creates to embed the file in the page.

  • Sending itab with different structure in form-perfomr

    Hello,
    I have a
    perform generate_master tables itab1.
    perform generate_master tables itab1.
    form generate_master tables itab structure ?.
    loop at itab into wa_itab.
    lv_werks = wa_itab-werks.
    endloop.
    endform.
    here the structure for wa_ will be different.
    Can anyone help me with this.
    Alternate solutions are welcome.
    Regards
    Renu

    Hi Renu,
    if you want to process tables of different structures in the form, you can
    - pass the structure name
    FORM generate_master
      changing itab type table
      using    strucname type tabname.
    field-symbols:
      <rec1> type strucname1,
      <rec2> type strucname2.
      case strucname.
        when 'STRUCNAME1'.
        loop at itab assigning <rec1>.
          write: / <rec1>-field1.
        endloop.
        when 'STRUCNAME2'.
        loop at itab assigning <rec2>.
          write: / <rec2>-field2.
        endloop.
      endcase.
    endform.
    - try to find you fields and decide on success for this
    FORM generate_master
      changing itab type table.
    field-symbols:
      <rec> type any,
      <fld> type any,
      loop at itab assigning <rec>.
        assign component 'FIELD1' of structure  <rec> to <fld>.
        if sy-subrc = 0.
          write: / <fld>.
        endif.
        assign component 'FIELD2' of structure  <rec> to <fld>.
        if sy-subrc = 0.
          write: / <fld>.
        endif,
      endloop.
    endform.
    And then use
    PERFORM CHANGING itab[].
    Note:
    LOOP AT itab ASSIGNING <field-symbol>.
    is never slower, in most cases much faster than
    LOOP AT itab INTO wa.
    And you can never forget the MODIFY statement because you work with the table record directly.
    Regards
    Clemens

  • Pass table name as a parameter to function

    Is there a way to pass table name as a parameter to functions? Then update the table in the function.
    Thanks a lot.
    Jiaxin

    Hi, Harm,
    Thank you very much for your suggestion and example. But to get my program work, i need to realise code like follows:
    CREATE OR REPLACE FUNCTION delstu_func(stuno char) RETURN NUMBER AS
    BEGIN
    EXECUTE IMMEDIATE 'DELETE FROM student s' ||
    'WHERE' || 's.student_number' || '=' || stuno;
    LOOP
    DBMS_OUTPUT.PUT_LINE('record deleted');
    END LOOP;
    END;
    SELECT delstu_func('s11') FROM STUDENT;
    The intention is to check if such a function can perform operations such as update, delete and insert on occurence of certain values. When executing the above statement, the system returns an error message:
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    ORA-06512: at "SCMJD1.DELSTU_FUNC", line 3
    Could you tell me where is wrong?
    Jiaxin

  • The Proper way to go - Passing Serialized Java Objects vs. Web Services?

    The team which I am apart of in our little "community" is trying to convince some "others" (management) that we should not use web services to communicate (move large data) within the same application (allbeit a huge application spanning across many servers).
    Furthermore these "others" are trying to tell us that in this same application when two small apps. inside of this large app. are both java we should not communicate via serialized java objects but instead we should use Web Services and XML. We are trying to convince them that the simplest way is best.
    They have asked us to provide them with proof that passing serialized java objects back and forth between two smaller java applications inside of a larger one is an Industry Standard. Can anyone help either straighten my fellow workers and I out or help us convince the "others" of the proper way to go?

    When I was a consultant we always gave the client what they wanted. Even if it was the wrong choice. Suck it up.
    I'm glad I wasn't one of those customers. Although I agree that a customer is the one who decides what to do, when I pay someone for consultancy, I expect them to consult me. If they know I'm trying to do something that I shouldn't be doing, I expect a good consultant to be able to show me that there's a better way (not just tell me I'm not doing it right, mind you).
    We pass a lot of data using XML and we don't have any transmission or processing speed issues.
    Then you either have a much better network than our customer did, or we're not talking about the same amounts of data here.
    I used the JAX-RPC RI ...
    That's cool... our customer was, unfortunately, infected with Borland products, so we had to use BES. The web services on BES were run by Axis.
    How large were these messages?
    Huge... each element had about 15 attributes, so 1,200 elements would require 19,200 XML nodes (envelope not included). By comparison, the serialized messages weren't even a quarter that size. It's not just about what you send across the network; it's also the effort of parsing XML compared to desrializing Java objects. Our web service wasn't exactly the only process running at the server.
    Anyone who understand the fundamental difference between ASCII (XML) and binary (serialized) formats realizes that no web service can possibly achieve the performance of binary Java services. Why do you think that work is being put into binary web services? I'm not saying XML is never a good thing; just that it's not The Holy Grail that a lot of people are making it look like.
    http://issues.apache.org/jira/browse/AXIS-688
    Ouch.

  • Is there any way to pass a webapp item ID number to the input form of another webapp?

    Context:
    I'm working with a group of members who are collaborating on research.  The idea is for one person to post information, and then have others build on it, including attaching files, images and hyperlinks (so a simple forum doesn't work...).
    If I could have the item ID from the main webapp be passed to the "child" webapp, all would be well.  I tried {tag_itemid} but of course, this didn't work.  I can display the item ID and have the users retype it into a form, but this isn't very streamlined...   Is there any way to pass the information directly to the form?
    Thanks!!
    Linda

    Simply make the child web app form part of one of the main web app's layout(s)/template. That way, when you use {tag_itemid}, it will be that of the main web app.

  • How to Pass array from one form to another

    Hello Everyone,
    I have an array defined like this ....
    type array_type IS table of varchar2(4000) index by binary_integer;
    v_arr array_type;
    When I pass it next form I accept it like this...
    eEmail          IN owa_util.vc_arr     
    that works fine, as fas as user picked something......If user didn't pick anything....the form explodes....
    How can I do error handling by doing this....
    courses          IN owa_util.vc_arr          DEFAULT NULL
    as DEFAULT NULL doesnt work in case of an array....
    Thanks,
    Harsimrat

    and there is a fourth way in the database.
    Create a package with those variables in the package-spec you wish to transfer. Then create set- and get-functions on this structure.
    With this technique you can pass not only scalar-values - you can pass complex structures and a full set of data through an array for example

  • How to pass Parameters between two forms

    im trying to do this but i could not find any way for this.
    can any one help me how can i pass parameters between two forms
    in forms4.5. any help will be appreciated
    thanks.
    null

    Global variables can be used, but you can do what the online help
    says ...
    Parameters are passed to called forms by means of a parameter
    list. A parameter list is a named programmatic construct that is
    simply a list of parameter names (called keys) and their values.
    You can pass parameter values to forms invoked by the built-in
    subprograms CALL_FORM, OPEN_FORM, and NEW_FORM. In addition, you
    can pass parameter values to other Oracle tools with the
    RUN_PRODUCT procedure.
    A parameter you include in a parameter list can be either a text
    parameter or a data parameter. The parameter type determines how
    its value is interpreted.
    Text Parameters The value of a text parameter being passed to a
    called product is a CHAR string that can represent the following:
    n a user-defined form parameter defined in a form invoked
    by the CALL_FORM, OPEN_FORM, or NEW_FORM built-in subprograms
    n a command line or user-defined parameter for a product
    invoked with the RUN_PRODUCT built-in subprogram
    Data Parameters The value of a data parameter being passed to a
    called product is always the name of a record group defined in
    the current form. (A record group is a data structure that
    stores records derived from a query or through programmatic
    assignment.) Data parameters are used to pass data to products
    invoked with the RUN_PRODUCT built-in subprogram. You cannot
    pass data parameters to forms.
    The following table shows the structure of a parameter list that
    contains four parameters:
    Key Paramtype Value
    CITY Text_Parameter 'BOGOTA'
    CATEGORY Text_Parameter 'EXPORTS'
    MULTIPLIER Text_Parameter '.0275'
    NEW_DATA Data_Parameter 'RECORD_GROUP8'
    arun reddy (guest) wrote:
    : im trying to do this but i could not find any way for this.
    : can any one help me how can i pass parameters between two forms
    : in forms4.5. any help will be appreciated
    : thanks.
    null

  • Is it a proper way to use queue for consumer/producer model?

    Hi all,
      I am following the example of consumer/producer model to use the queue to synchronize the following process: The producer is a loop to produce N numbers, I will put every generated number into an array and after every 5 numbers generated, I put the array into the queue and pass it to the consumer. I have to wait the consumer use up the data and it will then remove the element from queue so the producer will get a chance to produce another 5 numbers. Since I set the maximum size of the queue to be ONE, I expect the producer and consumer take turns to produce / consume all five numbers and pass the chance to the other. Here is my code
    when the case box is false, the code will be
    For the first 5 numbers, the produce will generate every thing right and put that into the array, and it will pass the array to the quere so the consumer will get a chance to loop over the array. I except the procude's loop will continue only when the queue is available (i.e. all elements are removed), but it seems that once the consumer start the loop the produce 's loop will continue (so the indicator x+1 and x+2 will show numbers changed). But it is not what I want, I know there must be something wrong but I can't tell what is it.
    Solved!
    Go to Solution.

    dragondriver wrote:
    As you said in 1, the sequency structure enforcing the execution order, that's why I put it there, in this example, to put the issue simple, I replace the complete code with number increase, in the real case, the first +1 and +2 must be executed in that order.
    Mikeporter mentioned:
    1. Get rid of all the sequence structures. None of them are doing anything but enforcing an execution order that would be the same without them.
    So even if you remove the sequence structure, there will be a fixed & defined execution order and that is because LabVIEW follows DATA FLOW MODEL.
    Data Flow Model (specifically in context of LabVIEW): A block diagram node executes when it receives all required inputs. When a node executes, it produces output data and passes the data to the next node in the dataflow path. The movement of data through the nodes determines the execution order of the VIs and functions on the block diagram (Click here for reference).
    Now in your code, just removing the sequence structure will not make sure that the execution order will gonna remain same but you need to do few very small modifications (like pass the error wire through For loop, before it goes to 'Dequeue Element' node).
    Coming to the main topic: is it a proper way to use queue for consumer/producer model?
    The model you're using (and calling it as consumer/producer model) is way too deviated from the original consumer/producer model model.
    dragondriver wrote:
    For the second one, yes, it is my fault to remove that while. I actually start from the example of Producer/Consumer design pattern template, but I didn't pay attention to the while loop in the consumer part.
    While loops (both Producer & Consumer) are the essential part of this architecture and can't be removed. You may want to start your code again using standard template.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.

  • Passing a structure from Java to PL/SQL Procedure

    Environment: Oracle DB, Tomcat/Apache
    How do we pass a structure (Table Record Type) from Java to a PL/SQL Stored Procedure?
    We are doing JSP-->JavaClass/Bean to communicate to DB. We have an existing PL/SQL packages/Procedure to insert records into table (These procedures have record types as in/out parameters). So is there a way to call these from Java?
    Thanks in advance.
    Ramesh

    Oracle9 i JDBC Developers Guide and Reference(page 21-16):
    It is not feasible for Oracle JDBC drivers to support calling arguments or return
    values of the PL/SQL RECORD, BOOLEAN, or table with non-scalar element types.
    However, Oracle JDBC drivers support PL/SQL index-by table of scalar element
    types. For a complete description of this, see "Accessing PL/SQL Index-by Tables"
    on page 16-21.
    As a workaround to PL/SQL RECORD, BOOLEAN, or non-scalar table types, create
    wrapper procedures that handle the data as types supported by JDBC. For example,
    to wrap a stored procedure that uses PL/SQL booleans, create a stored procedure
    that takes a character or number from JDBC and passes it to the original procedure
    as BOOLEAN or, for an output parameter, accepts a BOOLEAN argument from the
    original procedure and passes it as a CHAR or NUMBER to JDBC. Similarly, to wrap a
    stored procedure that uses PL/SQL records, create a stored procedure that handles
    a record in its individual components (such as CHAR and NUMBER) or in a structured
    object type. To wrap a stored procedure that uses PL/SQL tables, break the data
    into components or perhaps use Oracle collection types.

  • Is there a way to pass or access the FileGlobal​s of the main sequence from an ActiveX subsequenc​e that runs in parallel?

    I developed an elborate avionics Test Bench using the data types and FileGlobals to define all of my instruments and signals. The instruments have some minor changes between Test Bench's and the signals change between projects. The actual LabVIEW VI's were written so that they would be generic, in nature, and rely on spreadsheets to determine what inputs and expected outputs are to be tested and use the FileGlobals to determine how to process each signal from this extensive data structure. This methodology has worked well so far. Now I have the need to read some of the signals being output by the black box and compute a signal as input. The black box it very particular about the timing related to how fast this input changes in response to the outputs.
    Anyway, I was able to develop another sub-sequence within the main sequence and have it run as a parallel process. The problem that I have is that this extensive FileGlobals data structure is shown in the sub-sequence, but all of the data is zero or blank. What I really need is the FileGlobal data in the sub-sequence to be equal to the FileGlobals data of the main sequence at the time the ActiveX sequence is started OR have some way to access the main sequence FileGlobals from the ActiveX sub-sequence. I was able to use the when doing a Action of "call method" and a moethod of "NewExecution" to start the sub-sequence. The problem is that the data passed was only the first element in the FilGlobals structure and not the entire FileGlobals.
    I have TestStand version 1.0.3 . I know, the answer is usually to upgrade, but I have my own company and am sub-contracting at this company. It took me a month to convince this company that TestStand was the way to go rather than use the old LabVIEW Test Executive that they still have. The point is that it may be difficult to get them to get a later version and at this point I do not have time to wait for a upgrade. So I need to determine an easy way to impliment this with the existing version of TestStand.
    Any pointers on how you might solve this problem would be appreciated. You can email me directly at [email protected] .
    Thank you for your help!

    William,
    As you alluded, TestStand 2.0 has better solutions to this problem than TestStand 1.0.x. These include
    1) Executing the subsequence on a different thread but under the same execution. The file globals are then common to the calling and called sequence. The improved Sequence Call step type gives you this option.
    2) There is a new sequence file property that provides that "All Executions Share the Same File Globals".
    The reason that the file globals are not shared between your 2 sequences is that they are each executed as separate executions. That is, they are each executed using the NewExecution method. With each new execution a run-time copy of the sequence is made, including the file globals.
    I am assuming that you want to execute the subsequence asynchronously (i.e. in parallel) to the MainSequence and therefore must use the NewExecution method to do so. Since you must use TestStand 1.0.3 then the best option is to pass the file globals to the new execution as sequence parameters. It sounds like you tried this but had difficulties. The steps to do this are:
    A) Create parameters in your called sequence that mirror the file globals that you want to pass from your MainSequence.
    B) Create a new data type that is a container. The subproperties of this container must mirror the parameters in your called sequence. It is important that they are in the same order as the parameters.
    C) Create an instance of this container data type as variable.
    D) Pass this variable as the parameter of the NewExecution method.
    I have attached an example of how to do this. I have 2 file globals that I want passed, Number and String. I have another file global that is an instance of the parameter container that I pass with the NewExecution method (could also have made as local variable). Any time I update the values of the container�s subproperty, the changes are available in the executing "subsequence". Therefore, I must update the value of these container subproperties every time I want to have access to new file global values. There is clearly some redundancy here in that my MainSequence must copy the Number and String values to the container subproperties. If fact, it may be better to simply delete the Number and String file globals and simply use the subproperties of the container directly.
    You probably have to play around with the example to synchronize the change of the file globals with the message popups in the subsequence. In TS 2.0 I would have synchronized them with the new synchronization step types.
    Attachments:
    passfileglobals.seq ‏37 KB

Maybe you are looking for

  • How to activate my iphone 4 that is locked at (att) in UAE

    Hi. I have purchased an iphone 4 from att and it's locked,then i decided to go back to the UAE but the phone is locked so i cant use it how can i make it work on UAE Carriers (Etisalat-Du) please help me

  • Can't open pdf file linked through a ASPX link in Safari

    I'm a new Mac user so sorry if this is basic. It appears when I click on a link in Safari that should open a PDF file (link uses a ASP link) I get the download box instead. I can download the file to my desktop and open it with adobe from there. I ju

  • XI File Adapter Custom File Encoding for  issues between SJIS and CP932

    Dear SAP Forum, Has anybody found a solution for the difference between the JVM (IANA) SJIS and MS SJIS implementation ? When users enter characters in SAPGUI, the MS SJIS implementation is used, but when the XI file adapter writes SJIS, the JVM SJIS

  • Problem in running Linux command using JavaRuntine

    All, When I ran a Linux command in Java Program It does not give a correct output instead it returns null string. When I ran the Qsub command( as given in the below program) in Java program I suppose to get Unable to run job: unknown resource "mechhp

  • Embedded Profiles

    Dear All, I wish to check my understanding of embedded profiles. I will have to print out from a second machine that I will not have the ICC profile I am using installed. You use Edit>Convert to Profile Edit>Colour Settings is set to preserve profile