Matrix Problem

Hai to all,
           I have designed the form using screen painter. On that iam having matirx. There are 5 columns. On that one column iam using date. Iam using datasource to fill the matrix. I have specify the date in datasource.
My problem is:
While Adding the records iam getting as date format in tht column but while updation while iam entering the number it is not coverting to date format..The number is showing as it is....
Whts the problem i dont knw????????/
Can anybody help me........
Regards,
Anitha

Hi Anitha,
If you work with a date from a datasource the value is retrieved as yyyyMMdd. You can convert it to a date format with the following VB code:
Dim dDate as Date
dDate = Date.ParseExact(oMatrix.Columns.Item("myColumn").Cells.Item(iRow).Specific.value, "yyyyMMdd", System.Globalization.DateTimeFormatInfo.InvariantInfo)
Hope it helps,
Adele

Similar Messages

  • Help!! matrix problems

    Hi, i've got a problem. i need to read in a matrix from a file which consists of a series numbers.
    THe program i am trying to write is to do with renting apartments.
    an example file looks like this:
    0 400 450 510
    1 500 560 630
    2 625 676 740
    3 1000 1250 1600
    the first column is the floor number and the following columns represent the cost of an appartment on that floor with certain numbers of bedrooms, always beginning with zero so the four colums in this example are
    Floor Zero One Two
    e.g an appartment on the ground floor (0) with one bedroom is 450
    I need to writ a program which prompts a user for the floor number and the number of rooms. It then needs to return the correct price.
    I know how to promt the user so thats not a problem, i just need help with the part with finding the correct price in the matrix.
    I think it requires storing the number of colums and rows but i dont know how to do it
    Please help
    Thank you
    Sarah x

    She's rich.
    Rich ?
    How rich?
    More than you can imagine.
    I can imagine quite a bit.
    You'll get it.
    I better.
    This is one version of many.
    import java.io.*;
    import java.util.Vector;
    public class Napoleon
        public static void main(String[] args) throws IOException
            FileInputStream stream = new FileInputStream("prices.dat");
            InputStreamReader reader = new InputStreamReader(stream);
            StreamTokenizer tokens = new StreamTokenizer(reader);
            Vector v = new Vector();
            while(tokens.nextToken() != tokens.TT_EOF)
                v.add(new Integer((int) tokens.nval));
                System.out.println(new Integer((int) tokens.nval));
            System.out.println("Enter floor number: ");
            BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
            String line1 = in.readLine();
            System.out.println("Enter no. rooms: ");
            String line2 = in.readLine();
            int x = Integer.parseInt(line1);
            int y = Integer.parseInt(line2);
            int numFloors = v.size()/4;
            if(x > 4) System.out.println("Max Floors: 4");
            if(y > 3) System.out.println("Max no. rooms: 3");
            int dest = (((x-1)*4)+y);
            System.out.println("PRICE: " + v.get(dest));
    }Now then, send me some duke bling bling.

  • Matrix Problem Help !!!

    I am new to solve matrix using labview.
    I have this
    equation
    Vt = Ia*Ra + Wm*Km
    Vt = 10X1 matrix
    Ia = 10X1 matrix
    and Wm = 10X1 matrix
    I want to solve Ra and Km
    I have tried to solve it by using
    [Vt] = [Ia ; Wm]* [Ra Km]'
    it becomes a
    [10X1]= [10X2] * [2X1]    matrix
    A=B *[Ra Km]'
    solving it by
    inverse(B)*A = [Ra Km]
    this style cant work ......
    cause B can not be inverse as it is not a square matrix ....
    Any idea how to solve Km and Ra ???

    I have already found a soultion to this problem ...
    Thanks

  • Matrix problems

    I have created an addon for the sales order form.
    I would like the addon to prevent the user from leaving the quantity field until a specific condition is met, which is determined by a query which is based on the item and quantity of the specific line.
    For example if on line 2 of the matrix there is an item '1111' then a query is run using that item and if the specific result is 0 then the user must not be able to leave the quantity field on line 2.
    This is my code so far:
    if (pVal.FormType == 139 && pVal.ItemUID == "38" && pVal.ColUID == "11" && pVal.EventType == SAPbouiCOM.BoEventTypes.et_VALIDATE)
    but this runs in an infinite loop and doesn't allow the user to change the quantity.
    Any ideas?

    Hi and thanks for the reply. Maybe I wasn't too clear. The code for querying the database and getting a result works fine with my addon. The problem is catching the event. It seems to run in an infinite loop when I set the quantity field as active. This is my full code:
                    if (pVal.FormType == 139 && pVal.ItemUID == "38" && pVal.ColUID == "11" && pVal.EventType == SAPbouiCOM.BoEventTypes.et_VALIDATE)
                    try
                        oItem = oForm.Items.Item("14");
                        oText = (SAPbouiCOM.EditText)(oNewItem.Specific);
                        if (oText.Value.ToString() == "Pick List")
                            //itemcode
                            oText = ((SAPbouiCOM.EditText)((SAPbouiCOM.Matrix)(oForm.Items.Item("38").Specific)).Columns.Item("1").Cells.Item(pVal.Row).Specific);
                            string it = oText.Value.ToString();
                            //quantity
                            oText = ((SAPbouiCOM.EditText)((SAPbouiCOM.Matrix)(oForm.Items.Item("38").Specific)).Columns.Item("11").Cells.Item(pVal.Row).Specific);
                            string q = oText.Value.ToString();
                            //Whs
                            oText = ((SAPbouiCOM.EditText)((SAPbouiCOM.Matrix)(oForm.Items.Item("38").Specific)).Columns.Item("24").Cells.Item(pVal.Row).Specific);
                            string w = oText.Value.ToString();
                            string query = "SELECT " +
            "CASE WHEN " +
            "( " +
            "(Convert(numeric(19,6),'" + q + "')>(SELECT OnHAND FROM OITW WHERE ItemCode='" + it + "' AND WhsCode= '" + w + "')) " +
            "OR " +
            "(SELECT SUM(OnHand)-SUM(isCommited)-Convert(numeric(19,6), '" + q + "') FROM OITW WHERE ItemCode= '" + it + "' GROUP BY ItemCode)<=0 " +
            ") " +
            "THEN '0' " +
            "ELSE '1'" +
            "END 'Test'";
                            oForm.DataSources.DataTables.Item("Descript").ExecuteQuery(query);
                            userDT = oForm.DataSources.DataTables.Item("Descript");
                            string s = userDT.Columns.Item("Test").Cells.Item(0).Value.ToString();
                            if (s == "0")
                                globals.SBO_Application.SetStatusBarMessage("Not enough Stock in Warehouse!!!!", SAPbouiCOM.BoMessageTime.bmt_Medium, true);
                                oText = ((SAPbouiCOM.EditText)((SAPbouiCOM.Matrix)(oForm.Items.Item("38").Specific)).Columns.Item("11").Cells.Item(pVal.Row).Specific);
                                oText.Active = true;
                    catch
    Edited by: Costas Ioannou on Jun 17, 2008 1:29 PM

  • Set item description (column 3) in matrix problem

    Hello there,
    I try to set field Dscription (column "3") in either Quotations or SalesOrders.
    But B1 keeps popping up with Item picker list.
    This is normal behaviour when you change this field and leave (without pressing CTRL), but how can I workaround this in SDK?
    Thanks in advance.
    Edited by: Harm van der Veen on Mar 2, 2009 11:56 AM
    Version 2007A - PL 41
    Dim oCell = DirectCast(Matrix.Columns.Item("3").Cells.Item(1), Cell)
    Dim oBox = DirectCast(oCell.Specific, EditText)
    oBox.String = "Variable Item Description"

    Thanks for the answer.
    It's not the most practical and clean method but it works for now.
    Can't Freeze Form using this method however.
    Dim oCell = DirectCast(Matrix.Columns.Item("3").Cells.Item(1), Cell)
    oCell.Click()
    MyApplication.SendKeys("Variable Item Description")
    MyApplication.SendKeys("^{TAB}")

  • User defined Table and matrix problem

    Hi,
    I have a user defined table. I am displaying data from this table using DBdataSource on a matrix in my form. After making changes to a cell on the matrix when i try to save the data back to the data source, the changes are not updated. I am using SBO2004 and using FlushToDataSource method to save the changes.
    Please help.
    Thanks.

    Fabio,
    I disagree with you, FlushtoDataSource does work on user form too.
    Once you use this function, you'll have to open a the userTable object, and save the records from the DBDataSource object to the table using this object.
    Sébastien

  • Matrix problem with scalar multiplication

    Hi, I am working on a matrix program. I need the program to perform a scalar multiplication ona matrix I have prepared on the screen. A scalar multiplication means I enter a number on an input box and that number must be multiplied by every number on the matrix. This is the code I am using for it to work:
    buttonScalar.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent event) {
                        try {
                             DisplayMatrix(ScalarMultiplication(ReadInMatrixNotSquare(matrixA)), result);
                        } catch (Exception e) {
                             System.err.println("Error:     " + e);
    and:
    // Scalar multiplication method
         public float[][] ScalarMultiplication(float[][] A, int row) {
              float product = 0;
              float matrix[][];
              String num = JOptionPane.showInputDialog(this, "Enter number you want to use for scalar multiplication");
              int n = Integer.parseInt(num);
              for(int i = 0; i < A[row].length; i++)
                   product += A[row]*n;
              return product;
    I get the following errors:
    ScalarMultiplication(float[][].int in Matrix cannot be applied to (float[][])
    incompatible types
    Can someone please help me? I dunno what I'm doing wrong.
    Thanks

    scalar multiplication of a matrix doesn't mean entering anything on a screen. you should abstract this without a user interface at all if you're doing it right.
    the fact that your code includes a JOptionPane in it tells me you're thinking about it incorrectly.
    %

  • Hi All matrix problem

    hi all,
    I want to add and delete row in matrix and i want like in purchase order in matrix when user click automatically that cell allow to addrow and after adding second row we can also add but in sample example of sap they given button like addrow for adding matrix row .if u have some code sample.
    please give me some solutions .
    Awaiting soon reply
    Rajkumar Gupta

    If (pVal.ItemUID = "38") And (pVal.ColUID = "ItemCode") Then
                                oMatrix = oForm.Items.Item("38").Specific
                                For i = 0 To oDataTable.Rows.Count - 1
                                    If pVal.Row = oMatrix.VisualRowCount Then
                                        oForm.DataSources.DBDataSources.Item(1).Offset = oForm.DataSources.DBDataSources.Item(1).Size - 1
                                        oForm.DataSources.DBDataSources.Item(1).SetValue("U_itemCode", oForm.DataSources.DBDataSources.Item(1).Offset, "")
                                        oForm.DataSources.DBDataSources.Item(1).SetValue("U_ItemDec", oForm.DataSources.DBDataSources.Item(1).Offset, "")
                                        oMatrix.SetLineData(oForm.DataSources.DBDataSources.Item(1).Size)
                                        oMatrix.FlushToDataSource()
                                    End If
                                    cflValBefore = oForm.DataSources.DBDataSources.Item(1).GetValue("U_itemCode", oForm.DataSources.DBDataSources.Item(1).Offset)
                                    oForm.DataSources.DBDataSources.Item(1).SetValue("U_itemCode", oForm.DataSources.DBDataSources.Item(1).Offset, oDataTable.GetValue("ItemCode", 0))
                                    oForm.DataSources.DBDataSources.Item(1).SetValue("U_ItemDec", oForm.DataSources.DBDataSources.Item(1).Offset, oDataTable.GetValue(1, 0))
                                    If oForm.Mode <> SAPbouiCOM.BoFormMode.fm_ADD_MODE Then
                                        If cflValBefore <> oForm.DataSources.DBDataSources.Item(1).GetValue("U_itemCode", oForm.DataSources.DBDataSources.Item(1).Offset) Then oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
                                        If cflValBefore <> oForm.DataSources.DBDataSources.Item(1).GetValue("U_ItemDec", oForm.DataSources.DBDataSources.Item(1).Offset) Then oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
                                    End If
                                    oMatrix.SetLineData(pVal.Row)
                                    oMatrix.AddRow(1, oMatrix.VisualRowCount)
                                    'oMatrix.SelectRow(1, True, False)
                                    oMatrix.FlushToDataSource()
                                    'If i = oDataTable.Rows.Count - 1 Then
                                    '    oMatrix.AddRow(1)
                                    'End If
                                Next
                            End If
    i m using this above code but same value add in new row which is added.

  • HI can u help me to sort out this Matrix Problem

    i ve used the following codes to create matrix in SAP 2007 A Pl 15.
    Set objItem = frmBPMaster.Items.Add("CCMatrix", it_MATRIX)
            Set oMatrixCC = objItem.Specific
            Set oColumns = oMatrixCC.Columns
            oMatrixCC.Layout = mlt_VerticalStaticTitle
    Set objItem = frmBPMaster.Items.Add("CCMatrix", it_MATRIX)
            objItem.Left = 175
            objItem.Width = 230.59
            objItem.Top = 135
            objItem.Height = 150
            objItem.ToPane = 2
            objItem.FromPane = 2
            Set oMatrixCC = objItem.Specific
            Set oColumns = oMatrixCC.Columns
            oMatrixCC.Layout = mlt_VerticalStaticTitle
            Set oColumn = oColumns.Add("#", it_EDIT)
            oColumn.Width = 2
            oColumn.RightJustified = True
            oColumn.Editable = False
            oColumn.DataBind.SetBound True, "", "20_CC"
            Set oColumn = oColumns.Add("CCName", it_EDIT)
            oColumn.TitleObject.Caption = "Credit Card Name"
            oColumn.Width = 16  
            oColumn.Editable = True
            oColumn.DataBind.SetBound True, "", "21_CC"
            oMatrixCC.Clear
            oMatrixCC.AddRow
            oMatrixCC.SetLineData 1      
            oMatrixCC.Columns("#").Visible = False
            oMatrixCC.AutoResizeColumns
    finally It shows multiple of columns in that matrix but i just want like this
    CCname -
    Type      -
    NO        -

    No, I didnt meant it so. Through SDK you arent able to do it with matrix object. The way which is functional I found is create form in screen painter -> you`ll receive srf file (xml) and in this xml is something as
    <action type="add"><item uid="matrixMZ" type="127" left="10" tab_order="0" width="1180" top="53" height="450" visible="1" enabled="1" from_pane="0" to_pane="0" disp_desc="0" right_just="0" description="" linkto="" forecolor="-1" backcolor="-1" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="1"><AutoManagedAttribute/><specific SelectionMode="1" layout="0" titleHeight="16" cellHeight="16"><columns>
    and there is cellHeight="16" ...
    The other way is save form as xml (property of form, example is in sdk help) and load it with height property.

  • Inverse of Matrix problem

    Hello.
    I have a inverse matrix task.Teacher said us that we have to create little a program which is finds inverse of the matrix which is given in code.
    I did something like this and when I gave him this task he said me that "I want the program calculate itself matrix size.You wont give size of matrix like int[4][4]; this.You just will write the matrix in your code and the program will change as depend to size and calculate automatically as the matrix."
    I some more explain for all of you understand more.
    Example I write in code
    3x3 a matrix okay.Below an example.
    3 4 6
    1 5 7
    1 3 7
    This is 3x3 matrix so its calculating.And I want now 4x4 matrix.
    4 5 1 6
    1 4 5 6
    2 4 5 5
    1 2 4 7
    Also this matrix will calculate as automatically depend to matrix size.
    I musnt write [4][4] or [3][3].Instead this I need to write something like will change as matrix size automatically.I hope you understand.Because Im really bored with this.Its just second month in programming for us and I have no idea about this task anymore.
    import java.util.Scanner;
    public class inversematrix {
    public static void main(String[] args)
    int[][] matrix = new int[4][4];
    Scanner inputUser = new Scanner(System.in);
    System.out.println("Write matrix number");
    for(int row=0; row<4; row++)
    for(int column=0; column<4; column++)
    System.out.print("A"+(row+1)+(column+1)+" = ");
    matrix[row][column] = inputUser.nextInt();
    System.out.println("4 na 4 matris");
    for(int row=0; row<3; row++)
    for(int column=0; column<3; column++)
    System.out.printf("%3d",matrix[row][column]);
    System.out.print("\n");
    System.out.println("Inverse of matrix calculating");
    int matrixInvers[][] = {{matrix[1][1]*matrix[2][2]-matrix[1][2]*matrix[2][1],matrix[0][2]*matrix[2][1]-matrix[0][1]*matrix[2][2],matrix[0][1]*matrix[1][2]-matrix[0][2]*matrix[1][1]},
    {matrix[1][2]*matrix[2][0]-matrix[1][0]*matrix[2][2],matrix[0][0]*matrix[2][2]-matrix[0][2]*matrix[2][0],matrix[0][2]*matrix[1][0]-matrix[0][0]*matrix[1][2]},
    {matrix[1][0]*matrix[2][1]-matrix[1][1]*matrix[2][0],matrix[0][2]*matrix[2][0]-matrix[0][0]*matrix[2][1],matrix[0][0]*matrix[1][1]-matrix[0][1]*matrix[1][0]}};
    System.out.println("Inverse matrix");
    for(int row=0; row<3; row++)
    for(int column=0; column<3; column++)
    System.out.printf("%3d",matrixInvers[row][column]);
    System.out.print("\n");
    Edited by: 1004884 on 08.May.2013 14:27

    Come on man so what should I ask here?First of all, your question has nothing, nada, zilch, zero, or in Java terms
    final const int amount_of_relevance_of_your_question_to_this_forum = 0;to do with the topic of this forum, which is the JDeveloper IDE and the Oracle Application Development Framework (ADF)
    You're asking general Java questions, in which case there are plenty of general Java forums out there (including on this site). If I were taking a course and was stumped, I'd either:
    * ask the teacher or teaching assistant for help
    * talk to one of my classmates

  • Problem AddRow in Matrix

    Execute the following code to add rows in a matrix.
    for (int RecIndex = 0; RecIndex <= RecCount - 1; RecIndex++)
                            oMatrix.AddRow(1, oMatrix.RowCount);
                            string coluna = rec.Fields.Item(0).Value.ToString();
                            string descricao = rec.Fields.Item(1).Value.ToString();
                            ((SAPbouiCOM.EditText)oMatrix.Columns.Item("V_0").Cells.Item(oMatrix.RowCount).Specific).Value = coluna;
                            ((SAPbouiCOM.EditText)oMatrix.Columns.Item("V_1").Cells.Item(oMatrix.RowCount).Specific).Value = descricao;
                            rec.MoveNext();
    The problem is that the values ​​are added to the matrix problems. Sometimes it adds value in a row, and sometimes the line with preeche blank.
    In other words, is created in the amount of matrix rows according to the For, but many line are not satisfied with the values ​​passed.

    Hi Harley,
    What type of datasource is your matrix bound to (ie DBDataSource, UserDataSource or DataTable)? It's normally better to write your data to the datasource rather than the matrix cells (the only exception being system forms).
    Kind Regards,
    Owen

  • Dot-Matrix Printers configuration.

    Hi All,
    Anybody has any documents on these (weired) Dot Matrix printers configuration. Am working on Japanese characters and the output of the printer behaves weiredly for 1 byte characrers and 2 byte charactre. So when I try to print using the same Layout Set (SAPScript), I get different positioning of the fields depending upon the bytes of characters.
    So I want to know and would love to have the information for Dot Matrix problems and their resolutions in SDN.
    Thanks
    Anand

    Is anyone having a idea of how to configure the Dot-Matrix printer with oracle Apps andFollow the same procedure of setting up any other printer (setup the printer at the OS level, register the printer in the application, and restart the CM).
    Note: 297522.1 - How to investigate printing issues and work towards its resolution?
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=297522.1
    Note: 110406.1 - Check Printing Frequently Asked Questions
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=110406.1
    Note: 200359.1 - Oracle Application Object Library Printer Setup Test
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=200359.1
    also i want to restrict the number of print copies for a conncurrent program.i,e(report is run through con. request which automatically goes to print and number of copies is 1 always.This can be achieved using "Concurrent:Report Copies" profile option.
    Note: 1011729.6 - How To Specify the Number of Copies to Print by Report?
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=1011729.6
    Note: 73804.1 - How to setup Printer Arguments Within Oracle Applications
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=73804.1

  • Matrix formating

    hi,
    I am working on one matrix problem and not able to design good algorithm for that one
    here is problem.....
    it's n*n matrix with following condition
    1) Matrix contains 1...n2 elements exactly once
    2) m[i,k] + m[i,l] = m[i,l] + m [j,k] where i,j,k,l = 1.....n
    can any one give me good algo plz...........

    Start by figuring out what the homework is asking you to do.
    For instance, what should this algorithm do - construct such a matrix?, verify that a matrix is of the correct type? something else?
    Condition (2) looks rather bizarre if i,j,k,l are allowed to have all values over the range 1...n. Cancelling the m[i,l] terms would leave the rows (or columns) consisting of a single element repeated n times.

  • Print Report of cash Memo OR Page settings for cutsheet papers

    hello and hi
    me have a report of cash memo page size 12 by 13.8 cm (5 by 4.8 inch) ,using printer dot matrix
    problem is that when me print a single page , printer not stop , its go to end of next page its mean printer print at portarit size page ,
    any body help me how me ll handel the printer
    any one has a build example pls send me at [email protected] or send me link
    regard
    mahr

    Hi,
    You need to modify the prt file that your character mode report is using.
    the name of the prt file is the value in DESFORMAT system property in your report.
    Br,
    Gouri Sankar

  • Stacked Percentage Bar label and value

    Hi,
    I have created a stacked percentage bar using 4 series. I have 2 questions.
    First question: Since it is a percentage bar, the height for all seriers are the same (100%), but each series has a value (eg. 463). Under series attribute, I checked on "show value", but when I run the page, the values for each series don't show up. Is there a way of showing these values?
    Second question: If the labels are too long, they get cut and don't show the full text, is there a way to enlarge the space so all text for the labels fit in the graph?
    Thanks a lot!

    If the values on the bars are not displaying you probably have the "sparse matrix" problem. Stacked bar charts do not work correctly unless there is a row for every possible value of the "order by" variable in every series. You can test this by running the query for each series in sqlplus. You must get the same number of rows from each query.
    The best way to fix this is to create a "stub" table that contains all of the distinct values of the "order by" column in your source table. Use this stub table as a pivot for a left outer join with the source table in your series query. Sometimes you need to nvl to handle nulls in the result. When every bar has a value in every series query then the values will be displayed on the bars.

Maybe you are looking for

  • Strange characters when copy/paste from Word

    Hi, I have in Word u2018hellou2019 and when I paste it in the Notes of IR and save it, it turns into  018hello 019 so the apostrophes transform into these strange characters. I checked with Notepad, Excel and Wordpad and this issue does not occur, on

  • DB connectivi​ty toolkit: syntax error in a SELECT data from joined tables

    Hello everyone I'm trying to put in labview an SQL query on joined tables. As example I take a DB for storing the data of 2on2 basketball games, whose tables are matches(matchId,teamA,teamB) teams(teamId,PlayerAname,PlayerBname,Nationality) nationali

  • Stollen Ipod, need serial number!!!

    Ok, so I had my Ipod stollen awhile ago. I have gotten a new one since but I found out who has my old one and I need to prove that the old one is mine. I missplaced my packaging and need the serial number to report it to my boss. I need to know how t

  • Inbound - Outbound Message monitoring

    Hello Friends, TO COME XI >>> We can see the payload from sender to XI in sxmb_moni TO OUT How can we see the outgoing message payload from XI? Best Regards, FK

  • How to keep drawings? Draw highlights?

    Hi, I'm new in Java 2D. I use Graphics2D.draw method to draw some lines on the panel. But after another windows cover the panel, all the lines except the last point will lost. How to keep these drawings after another windows cover them? Thx a lots.