Creating array of references to another array's elements

I have been coached by NI support to read an array of picture files into an array of picture indicators and then in order to save memory, establish an array of references to the array of picture indicators' elements so that I can use them in a subsequent loop.    Does anyone know a quick way to create this array of references from an array of picture indicators? 
Solved!
Go to Solution.

My understanding is there is only one reference to an array element.  There is no such thing as references to different array elements.
Why wouldn't you use a reference to the array, use the value property node, then use index array to get out the picture you are interested in?

Similar Messages

  • Getting an array to print into another array.

    Hi all. So after an illness and other things i had enough time to think about my project. I decided i was going about it a more complicated way than what was needed. So now i've began work again. I felt lik i was getting along nicely until i had trouble printing my Snake array into my Grid 2D array.
    If anyone can help me with the error and why i cannot print the snake onto the grid that would be great?
    Thanks.
    Grid Class:
    import java.lang.*;
    public class Grid
         public static void main(String[] args)
              //Final int of ROWS and COLS for the grid size
              final int ROWS = 33;
              final int COLS = 33;
              // int counter will be used to display the grid
              int counter = 0;
              //Create new String array called Grid
              String[][] Grid = new String[ROWS][COLS];
              //new Food, Snake and Catcher
              Food Fd = new Food();
              Snake Sn = new Snake();
              Catcher cat = new Catcher();
              //Nested for loops to display the grid
              for (int i =0; i < Grid.length; i++)
                       for (int j = 0; j < Grid[0].length; j++)
                      Grid[i][j] = " ";
                        Grid[0] = "|";
                        Grid[i][32] = "|";
                        Grid[0][j] = "-";
                        Grid[32][j] = "-";
                        Grid[12][12] = Fd.food;//Print food F onto grid
                        Grid[15][15] = Sn.snake;//Print snake onto grid (NOT WORKING YET!!)
                        Grid[5][10] = cat.catcher;//print catcher on grid
                        System.out.print(Grid[i][j]);//Prints grid
                        counter = counter + 1;
                        if(counter == 33)
                             counter = 0;
                             System.out.println("");
    Snake Class:import java.lang.*;
    public class Snake
         public static void main(String[] args)
              final int Snake = 20;
              String[] snake = new String[Snake];
                   for (int h =0; h < snake.length; h++)
                             snake[0] = "+";
                             snake[1] = "*";
                             snake[2] = "*";
                             snake[3] = "*";
                             System.out.println(snake[h]);
    }Error:Grid.java:28: cannot find symbol
    symbol : variable snake
    location: class Snake
    Grid[15][15] = Sn.snake;
    ^
    1 error                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    I have looked at it but im afraid i dont quite understand what your trying to say. I have edited my code a bit and removed the snake array, now its just a String "H"
    I've tried to get it to move but the code i entered doesn't seem quite right.
    Here is my new code so far.
    import java.lang.*;
    public class Grid
         public static void main(String[] args)
              //Final int of ROWS and COLS for the grid size
              final int ROWS = 33;
              final int COLS = 33;
              char move;
              // int counter will be used to display the grid
              int counter = 0;
              //Create new String array called Grid
              String[][] Grid = new String[ROWS][COLS];
              //new Food
              Food Fd = new Food();
              Score myScore = new Score();
              Snake sn = new Snake();
              Keyboard kb = new Keyboard();
              //Nested for loops to display the grid
              for (int i =0; i < Grid.length; i++)
                       for (int j = 0; j < Grid[0].length; j++)
                      Grid[i][j] = " ";
                        Grid[0] = "#";
                        Grid[i][32] = "#";
                        Grid[0][j] = "#";
                        Grid[32][j] = "#";
                        Grid[Fd.fdx][Fd.fdy] = Fd.food;//Print food F onto grid
                        Grid[sn.snakeHeadX][sn.snakeHeadY] = sn.snakeHead;
                        System.out.print(Grid[i][j]);//Prints grid
                        counter = counter + 1;
                        if(counter == 33)
                             counter = 0;
                             System.out.println("");
              System.out.println("Score: "+myScore.Score);
              System.out.println("Please Enter either w,a,s,d to move up, left, down, right accordingly: ");
              move = kb.readChar();
              if (move = w)
                   sn.snakeHeadY++;
              else if (move = s)
                   sn.snakeHeadY--;
              else if (move = a)
                        sn.snakeHeadX--;
              else if (move = d)
                        sn.snakeHeadX++;
              else
                   System.out.println("Invalid move!");
    }import java.lang.*;
    public class Snake
              String snakeHead = "H";
              int snakeHeadX = 15;
              int snakeHeadY = 15;
              char move;
    }They print out this error,Grid.java:50: cannot find symbol
    symbol : variable w
    location: class Grid
    if (move = w)
    ^
    Grid.java:50: incompatible types
    found : char
    required: boolean
    if (move = w)
    ^
    Grid.java:54: cannot find symbol
    symbol : variable s
    location: class Grid
    else if (move = s)
    ^
    Grid.java:54: incompatible types
    found : char
    required: boolean
    else if (move = s)
    ^
    Grid.java:58: cannot find symbol
    symbol : variable a
    location: class Grid
    else if (move = a)
    ^
    Grid.java:58: incompatible types
    found : char
    required: boolean
    else if (move = a)
    ^
    Grid.java:62: cannot find symbol
    symbol : variable d
    location: class Grid
    else if (move = d)
    ^
    Grid.java:62: incompatible types
    found : char
    required: boolean
    else if (move = d)
    ^
    8 errors                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How build a function with an array in input and another array in output

    Hi, I need to create a function, which receive in input a list of Group's name and retrieve the correspondent list of Group's id.
    So I need to have these conditions:
    1) The parameter in input has to be only one "p_user_name" (an array of values)
    2) the return parameter has to be p_user_id (array of values)
    3) in the WHERE condition p_user_name has to be used in order to retrieve the list of user_id I need
    Following, a little example:
    FUNCTION get_group_id (p_user_name IN VARCHAR2) RETURN p_user_id
    IS
    BEGIN
    SELECT group_id FROM jtf_rs_groups_vl
    WHERE group_name = p_user_name
    RETURN p_user_id;
    END get_group_id;
    I think I have to create a new type with p_user_name, but I don't know after, how to join group_name (varchar2) with p_user_name.....
    Anybody can help me to find the light ?
    Thanks in advance
    Alex

    I need to create a function, which receive in input a list of Group's name and
    retrieve the correspondent list of Group's idAt the beginning the argument "p_user_name IN VARCHAR2" is not what you need. You should create global type - nested table of varchar2 values where you
    can keep the list of names. And you also need to create nested table of numbers
    to return IDs (if you really need collection but not ref cursor !):
    SQL> select empno, ename from emp;
         EMPNO ENAME
          7369 SMITH
          7499 ALLEN
          7521 WARD
          7566 JONES
          7654 MARTIN
          7698 BLAKE
          7782 CLARK
          7788 SCOTT
          7839 KING
          7844 TURNER
          7876 ADAMS
          7900 JAMES
          7902 FORD
          7934 MILLER
    14 rows selected.
    SQL> create type d_v is table of varchar2(10);
      2  /
    Type created.
    SQL> create type d_n is table of number;
      2  /
    Type created.
    SQL> create or replace function get_ids
      2  (names d_v) return d_n
      3  is
      4   ret_ids d_n;
      5  begin
      6   select empno
      7   bulk collect into ret_ids
      8   from emp, table(names) t
      9   where ename = t.column_value;
    10   return ret_ids;
    11  end;
    12  /
    Function created.
    SQL> declare
      2   d d_n;
      3  begin
      4 
      5   d := get_ids(d_v('KING','ALLEN'));
      6 
      7   for i in 1..d.count loop
      8    dbms_output.put_line(d(i));
      9   end loop;
    10 
    11  end;
    12  /
    7839
    7499
    PL/SQL procedure successfully completed.Rgds.

  • I have one array, say y and another array x. now, y=f(x). The system is a non-linear system. how do i find a equation of nth order for the y and x arrays.

    Hi,
    I have done this using MS excel.  In excel i plot a graph for the below values and i drew a trend line for that plot.  from that i am able to find the order and equation of best fit.  Is there any way to do this in Labview.  Give me some examples.  
    Note:
    y----> Speed
    x---->Pressure
    Please find the attachment for the graph of Pressure Vs Speed.
    Attachments:
    sample data.xls ‏24 KB

    Hi vissw,
    Excel has a better function: linestat, I thought it was (I'm not sure because excel is localized for these functions), maybe linest.
    In LabVIEW look foor 'general polynomial fit' it will do what you want, but I'm not sure it is present inevery LV version.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Array inside another array

    hi guys
    is it posible to place one array inside another array?
    something like
    public double[] dblarray(int n)
    double [] dbl2 = new double(n)
    return dbl2;
    public double[] dbl2array(int m,int n)
    int n=10
    double [] dbl2 = new dobule[m];
    for(int i = o;i < m ; i++)
    dbl1=dblarray(n)
    if tryed it an it told me its wrong. does any one know how to do it or if it is posible since i come from ansi c i know this is posible in c but is it in java???
    pleas help:)
    thanks
    jeliel

    No, it's not possible in a strict sense. Java is more type safe than C - in C there is no real array type...
    What you can have is an array of references (=pointers) to arrays of doubles, or double[][], and what your code does is more commonly written asdouble[][] dbl2 = new dobule[m][10];

  • How can I create an ActiveX IDL to pass an array of references into Labview

    It appears that LV is designed to be able to receive a COM variant that contains an array of references but I cannot understand what the appropriate IDL should be on the COM side of things. I am current trying to use a safearray to hold the references but the automation reference in LV returns a variant that is empty (VT_EMPTY). I have had success with COM interfaces that expose single references, scalers and arrays of scalers and I am able to get the data properly in LV.

    Hi,
    It looks like this is a duplicate post.  The other thread is here, and looks to contain a bit more information.  A response should be posted to this thread soon.
    Thanks.
    Jason W.
    Message Edited by jason_w on 10-18-2007 04:46 PM
    National Instruments
    Applications Engineer

  • Brick Wall Problem: Array of Clusters, Size of array from reference

    Good Morning Forums,
    I have hit a brick wall with my application and I am hoping somebody can help!
    I have an array of clusters of indeterminate size (the cluster is generic, data contained not relevant.).
    Inputs to the VI are: a reference to the array, and a variant containing the data.
    My problem is I need to determine the array size from these two inputs and I cannot find a way to do it!
    If the array contained a standard data type I can use the class name property to determine data type, and the size of the array returned from "select size" property to determine dimension size.  With this information i can cast the variant into the correct data type and use this to determine the size of the array.  If the data is a cluster the class name simply returns "cluster" so I cannot cast the variant and therefore am unable to determine the size.
    I am not worried about casting the data (once i determine the size this bit is no issue), I just need to determine the size (and preferably number of dimensions) of the array. Can this be done?
    Cheers for any help
    J
    John.P | Certified LabVIEW Architect | NI Alliance Member
    Solved!
    Go to Solution.

    John.P wrote:
    Good Morning Forums,
    I am not worried about casting the data (once i determine the size this bit is no issue), I just need to determine the size (and preferably number of dimensions) of the array. Can this be done?
    Cheers for any help
    J
    There seem to be a couple of potential solutions.:
    #1 if the varient is created within LabVIEW you can wite size(s) to a varient attribute.  This would be pretty straightforward and easy to implement- I imagine you would have thought of that so you may not have access to the code writing cluster to varient and it gets a bit trickier.
    #2 cast the varient to string and return string length-  this should give you a measure of total size and you would need to know the size per element of cluster (just cast one instance of cluster array to varient and then to string with size and size++) but this only returns the total size of the array since nDim arrays are actually stored sequentially. 
    Hope this helped
    Jeff

  • Array of references to references to objects? Skip lists...

    I'm trying to hammer out a SkipList ADT by tomorrow night. The structure of my SkipList is basically: A Skip list has a reference to the first SkipListNode. Each SkipListNode has an array of links, where a link of level 1 links to the next node that is at least level 1 (every node is at least level 1), and array of 2 links to the next node down the list that is at least that tall, etc. For the last tallest node in the list, it will have links that are null, as there are no nodes after it which can reach up to its higher level links.
    My problem is that as I traverse the list looking for the insert position, I need to keep track of the taller links which may be 'cut-off' by the newly inserted node. Just as with a normal LinkedList, I would want to make the new node point to where these old links pointed, and point the old links to the new node. What I have been trying to do is build an array:
    SkipListNode previousLinks[] = new SkipListNode[levelOfTallestNodeInSkipList];
    As I traverse a SkipListNode, I over-write the previousLinks[i] with every level i link I encounter. For example say I'm in a level 5 node (currentNode) with key 15. I'm trying to inser key 17. I try the level 5 node's level 5 link and its null, so I would want to make previousLinks[5] = currentNode[5]. I then try currentNode's level 4 link, it's not null but it points to a node with key 47, which is past the insertion point for a node with key 17. So again, I want previousLinks[4] to REFER TO currentNode[4]. Etc, etc... I get down to currentNode's level 1 link and see it links to a node with key 16 and level 1. Ok, this is less than 17 so I make currentNode = key 16 node (which is lvl 1). Then I traverse currentNode's only link- a level 1 link- and see that it links to a node with key 18. BOOM: here's the insert point. I randomly select level 4 for the new node which will hold 17. This means that I will 'cut-off' the level four link of the node holding key 15. What I want to be able to do is:
    /*connect new links to where old links point to*/
    for (int k = 0; k < newNode.level; k++) {
    if (k < current.level)
    newNode.links[k] = previousLinks[k];
    else
    newNode.links[k] = null;
    /*connect old links to newly created node*/
    for (int k = 0;
    k < Math.min(current.level, newNode.level); k++)
    previousLinks[k] = newNode;
    But this doesn't work. The previousLinks array seems to only hold the values which were copied from the earlier nodes, not references to the fields in the nodes which point further down the list. What I want is a C++ style array of pointers to fields in an object's array so that I can change where these fields point (refer).
    I hope this post makes enough sense for someone to at least give me a clue... thanks.

    My skiplist implementation has a method to lookup a node. The resultant array of nodes has length the maximum height of the skiplist. At each level the array containes a reference to the node prior to the one I am looking for at that level. This allows me to patch all the relevant nodes when I add/remove an item to/from the skiplist.
    My code might help give you the idea.
         * Looks up the payload in the list returning an array
         * of nodes that point to the element immediately before
         * the desired element.
         * @param target the node we are searching for
         * @return and array of Nodes that are just prior to the
         * node we are looking for.
        private Node[] lookup(Node target)
            Node[] update = new Node[MAX_HEIGHT+1];
            int k = m_height;
            Node p = m_header;
            do
                Node q = null;
                while (((q = p.getNext(k) )!= null) && (m_comparator.lessThan(q, target))) p = q;
                update[k] = p;
            }  while (--k >= 0);
            return update;
        }

  • Using an array of references to boolean controls as an input of a subvi to modify propierties from the passed controls.....

    Hello,
    I have a cluster of checkboxes and I want them to be exclusive an to change the visible objects of my vi when I change their state. To keep my code clear I decided to create a subvi that implements this functionality. My subvi recives an array of references to the objects from which I want to change the visibility, an array of references to the checkboxes (to be able change it's values to make them exclusive when one of the checkboxes change it's state), and an array of the values of the checkboxes in the last iteration (to be able to detect which one has change to true and set to false the other ones).
    The problem that I have is that when I use a property node to get the actual values of the checkboxes in the subvi (to compare them to their previus state and detect changes) I obtain a variant type and not a boolean. I've tried to set the mechanical action of the booleans references used as input in the subvi as switch but this doesn't seem to work. I understand that is cause the subvi can't know type of booleans that will recieve and asume the worst case....
    Is there a way to do what I want?
    I hope I've explained myself... Thanks in advance!
    Solved!
    Go to Solution.

    There are a few ways to deal with this, but it would help to see your code. Are you sending a reference of the Cluster into a VI, or individual references of the checkboxes? It sound like you are not using a strict reference. The workaround, since you know the datatype, is to use Variant to Data and change the variant to a boolean, but this shouldn't be necessary. Again, post some code so we can be more help.
    edit: It sounds like you are trying to hard code Radio Buttons. You do know that LabVIEW has Radio Buttons now, right?
    Richard

  • Create a sales order with reference to another one. (BAPI)

    Hi everybody,
    I'm trying to create a new sales order with reference to another one (That's important because of the documents flow).
    I'm using 'BAPI_SALESORDER_CREATEFROMDAT2' but I couldn´t do it yet. I've read some ideas about this kind of creation in this forum; but I still haven´t found the solution yet.
    Some ideas about the BAPI parameters I nedd to complete?
    Thanks in advance!!

    Hi,
    Go through this one
    *& Report ZSD_R_SALESORDER
    report zsd_r_salesorder1 line-size 132 message-id zmmbapi .
    *& Created By : shailaja
    *& Created on : 13.10.2007
    *& Requested By : vardhman
    *& Description of program :
    Internal table definition *
    data: gt_order_header_in like bapisdhead occurs 0 with header line,
    gt_return like bapireturn1 occurs 0 with header line, " Return Messages
    gt_order_items_in like bapiitemin occurs 0 with header line, " Item Data
    gt_salesdocument like bapivbeln-vbeln , "Number of Generated Document
    gt_order_partners like bapiparnr occurs 0 with header line, "Document Partner
    gt_return1 like bapiret2 occurs 0 with header line.
    Data definition *
    types: begin of ty_gt_ft_sales ,
    partn_numb(10) type n ,"Customer Number 1
    partn_role(2) ,"Partner function
    sales_org(4) , "Sales Organization
    distr_chan(2) , "Distribution Channel
    division(002), "DIVISION
    doc_type(4) , "Sales Document Type
    purch_no(020), "Purchase order
    material(18), "MATERIAL
    targetquantity(020),"Target quantity
    reqqty(020), "Req quantity
    reqdate(010), "req date
    *REQ_DATE_H(010),
    ref_1(012), "Ref
    unload_pt(025),
    *PARTN_ROLE(2) ,"Partner function
    *PARTN_NUMB(10) ,"Customer Number 1
    end of ty_gt_ft_sales,
    begin of ty_header ,
    partn_numb(10) ,"Customer Number 1
    partn_role(2) ,"Partner function
    sales_org(4) , "Sales Organization
    distr_chan(2) , "Distribution Channel
    division(002), "DIVISION
    doc_type(4) , "Sales Document Type
    purch_no(020), "Purchase order
    unload_pt(025),
    req_date_h(010),
    end of ty_header,
    begin of ty_item,
    material(18), "MATERIAL
    targetquantity(020),"Target quantity
    reqqty(020), "Req quantity
    reqdate(010), "req date
    ref_1(012), "Ref
    *UNLOAD(025),
    end of ty_item.
    data : msg(240) type c, " Return Message
    e_rec(8) type c, " Error Records Counter
    rec_no(8) type c, " Records Number Indicator
    s_rec(8) type c, " Successful Records Counter
    t_rec(8) type c, " Total Records Counter
    v_matnr like mara-matnr,
    v_parvw type parvw.
    data : gt_ft_sales type standard table of ty_gt_ft_sales with header line.
    data : wa_gt_ft_sales type ty_gt_ft_sales,
    wa_order_items_in like gt_order_items_in,
    wa_gt_ft_sales1 type ty_gt_ft_sales,
    wa_header type ty_header,
    salesdocument like bapivbeln-vbeln.
    selection block for EXCEL UPLOAD FILE
    selection-screen begin of block b1 with frame title text-000.
    parameters file type ibipparms-path obligatory.
    selection-screen end of block b1.
    *<<<<AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE .
    at selection-screen on value-request for file .
    perform getname.
    form getname.
    call function 'F4_FILENAME'
    exporting
    program_name = syst-cprog
    dynpro_number = syst-dynnr
    importing
    file_name = file.
    endform.
    *TOP-OF-PAGE.
    top-of-page.
    skip 3.
    format color col_heading inverse on.
    write 40 text-001.
    format color col_heading inverse off.
    skip 1.
    format color col_negative inverse on.
    write :/ text-002, 13 sy-mandt , 104 text-003, 121 sy-uname,
    / text-004, 13 sy-datum , 104 text-005, 121 sy-uzeit.
    format color col_negative inverse off.
    skip 3.
    *START-OF-SELECTION.
    start-of-selection.
    perform get_data.
    perform bapi.
    *end-of-page.
    perform result.
    form result.
    t_rec = e_rec + s_rec.
    skip 3.
    format color col_total inverse on.
    write: /38 text-007, t_rec.
    format color col_total inverse off.
    format color col_negative inverse on.
    write: /38 text-008, e_rec.
    format color col_negative inverse off.
    format color col_total inverse on.
    write: /38 text-009, s_rec.
    format color col_total inverse off.
    endform.
    *& Form get_data
    text
    --> p1 text
    <-- p2 text
    form get_data .
    call function 'WS_UPLOAD' "#EC *
    exporting
    filename = file
    filetype = 'DAT'
    tables
    data_tab = gt_ft_sales
    exceptions
    conversion_error = 1
    file_open_error = 2
    file_read_error = 3
    invalid_type = 4
    no_batch = 5
    unknown_error = 6
    invalid_table_width = 7
    gui_refuse_filetransfer = 8
    customer_error = 9
    no_authority = 10
    others = 11.
    if sy-subrc 0 .
    message e000.
    endif.
    endform. " get_data
    *& Form BAPI
    form bapi .
    loop at gt_ft_sales into wa_gt_ft_sales.
    wa_gt_ft_sales1 = wa_gt_ft_sales.
    at new partn_numb.
    wa_header-doc_type = wa_gt_ft_sales1-doc_type..
    wa_header-sales_org = wa_gt_ft_sales1-sales_org . "'0001'
    wa_header-distr_chan = wa_gt_ft_sales1-distr_chan. "'01'
    wa_header-division = wa_gt_ft_sales1-division. " '01'
    wa_header-purch_no = wa_gt_ft_sales1-purch_no.
    wa_header-req_date_h = wa_gt_ft_sales1-reqdate.
    call function 'CONVERSION_EXIT_PARVW_INPUT'
    exporting
    input = wa_gt_ft_sales1-partn_role
    importing
    output = v_parvw.
    wa_header-partn_role = v_parvw.
    wa_header-partn_numb = wa_gt_ft_sales1-partn_numb.
    wa_header-unload_pt = wa_gt_ft_sales1-unload_pt.
    move-corresponding wa_header to gt_order_partners.
    move-corresponding wa_header to gt_order_header_in.
    append gt_order_header_in.
    append gt_order_partners.
    endat.
    call function 'CONVERSION_EXIT_CCMAT_INPUT'
    exporting
    input = wa_gt_ft_sales1-material
    importing
    output = v_matnr.
    gt_order_items_in-material = v_matnr .
    gt_order_items_in-target_qty = wa_gt_ft_sales1-targetquantity . "'1000'
    gt_order_items_in-req_qty = wa_gt_ft_sales1-reqqty.
    gt_order_items_in-req_date = wa_gt_ft_sales1-reqdate.
    *GT_ORDER_ITEMS_IN-BILL_DATE = wa_GT_FT_SALES1-REQDATE.
    gt_order_items_in-ref_1 = wa_gt_ft_sales1-ref_1.
    append gt_order_items_in.
    clear : wa_gt_ft_sales1,wa_header.
    at end of partn_numb.
    call function 'BAPI_SALESORDER_CREATEFROMDAT1'
    exporting
    order_header_in = gt_order_header_in
    WITHOUT_COMMIT = ' '
    CONVERT_PARVW_AUART = 'X'
    importing
    salesdocument = salesdocument
    SOLD_TO_PARTY =
    SHIP_TO_PARTY =
    BILLING_PARTY =
    return = gt_return
    tables
    order_items_in = gt_order_items_in
    order_partners = gt_order_partners.
    ORDER_ITEMS_OUT =
    ORDER_CFGS_REF =
    ORDER_CFGS_INST =
    ORDER_CFGS_PART_OF =
    ORDER_CFGS_VALUE =
    ORDER_CCARD =
    ORDER_CFGS_BLOB =
    ORDER_SCHEDULE_EX =
    if gt_return-type eq 'E' .
    e_rec = e_rec + 1.
    read table gt_return with key id = 'V1'.
    format color col_negative inverse on.
    rec_no = e_rec + s_rec.
    concatenate text-006 rec_no ':'
    gt_return-message into msg separated by space .
    condense msg.
    write: / msg.
    format color col_negative inverse off.
    elseif gt_return-number = '000'.
    s_rec = s_rec + 1.
    format color col_positive inverse on.
    msg = 'SUCCESS'.
    condense msg.
    write: / msg .
    format color col_positive inverse off.
    write :/ salesdocument, 'Has been created'.
    perform commit_mm.
    endif.
    clear: gt_return[], msg.
    endat.
    endloop.
    endform. " SLALE_UPLOAD_DATA
    *& Form COMMIT_MM
    text
    --> p1 text
    <-- p2 text
    form commit_mm .
    call function 'BAPI_TRANSACTION_COMMIT'
    exporting
    wait = 'X'
    importing
    return = gt_return1.
    clear: gt_order_items_inhttp://].\"GT_ORDER_CONDITIONS_IN[.
    endform. " COMMIT_MM
    inthis pass re_doc field in header...
    Edited by: Naresh kumar

  • Create a Sales order with reference to another sales order  using BAPI

    Dear All,
    Can any one tell me what are all the parameters required to create a Sales order with reference to another sales order using BAPI_SALESORDER_CREATEFROMDAT2....
    Thanks in advance

    Hi Madhan
    Thanks a lot for your reply.
    However, I would like to know which parameters need to passed in this BAPI in case of SO creation with reference. I beleive there are only a few parameters that need to passed in ORDER_HEADER_IN, ORDER_ITEMS_IN, etc.
    Need to know exactly which are these parameters.
    Regards
    Mihir Shah.

  • Create a configurable material with reference to another config material

    Hi,
    I want to create a configurable material with reference to another configurable material from different system.
    Please tell me what data i need to check to see if that material has been created (copied manually) successfully.
    Thanks.

    Hi,
    In case of configurable material most important thing is configuration so please check weather the configuration is copied perfectly with all characteristics or not. Similarly check the valuation class and price control is proper or not.
    Regards,
    Umesh

  • BAPI to create sales order with reference to another sales order

    hi all,
    is there a bapi that allows you to create a sales order with reference to another sales order?
    thanks,
    V

    Hi Valencia,
    I think the normal BAPI (BAPI_SALESORDER_CREATEFROMDAT1)will do. You will have to fill the fields REF_DOC, REF_DOC_IT, REF_DOC_CA of the table ORDER_ITEMS_IN (and make sure that Customizing settings allow you to copy from order to order).
    Regards,
    John.

  • FM to create Sales order with reference to another Sales order

    Hi,
    Is there any inbound IDOC FM which can create a Sales Order with reference to another Sales order.
    PLease reply
    Santhana M.

    Hi,
    try FM BAPI_SALESORDER_CREATEFROMDAT2
    with ORDER_HEADER_IN fields
    REFOBJTYPE
    REFOBJKEY
    REFDOCTYPE
    Regards,
    Clemens

  • Sort Array of References by Label-Name

    I am developing on an DSC application with shared variables and alarming and events with a hugh amount of variables. Each variable is displayed on the front panel within tab controls. To reduce time and effort when expanding the variables I would like to arrange my references from the front panel by the label name. I've attached a part of the intialization of the front panel. There I have to manually expand each variable in the shared variable library, where the name of the variable has to be in the same order as the definition in the cluster.
    My approach was to build an array of references of digital type and sort the references by the label name. Because the shared variables have the same name as the controls they would be in the same order and I also could dislaim the cluster of references.
    maybe somebody can give my an hint.
    Kind Regards,
    Joachim
    Solved!
    Go to Solution.
    Attachments:
    fp.jpg ‏982 KB

    Hi Joachim,
    use the standard "sort an array of cluster" approach!
    Put the control label and the reference (in this order!) in a cluster, make an array of such clusters and sort the array. It will sort by the label and you can unbundle the reference in sorted order...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

Maybe you are looking for

  • Class loader Exception

    I am getting the following error even though the corresponding file is present in the app.jar. This happens when hibernates are getting loaded , when i start the oracle app server. Does anyone knows why its so. Caused by: org.hibernate.MappingExcepti

  • Which is better for FCPX... .aiff or .mp3?

    ...all other things being equal. Which file type is better and why? Thanks!

  • Data aggregation: which solution for this case ?

    Hi all, I have a fact table where measures are referred to a single year. Outlining, something like this: year quantity 1998 30 1998 20 2000 70 2001 20 2001 20 I would to build a cube and then to analyze "tot.quantity for each year" but don't want ag

  • HELP, about DB_AUTO_COMMIT

    look at the following codes, the compilation can be successful, but when executing it, ret=dbp->put(dbp,txn,&key,&data,0); will return non-zero, if db_flags is db_create|db_auto_commit, the execution can be normal, I do not know why, why can not I se

  • Repair cycle print out

    Dear all, I have created and maintained a new message type for the print out of the material document while issuing material to subcontractor for repairing. Everything is going fine except one thing i.e. whenever i am posting the material document th