Problem  inserting date using the date function

Hi there,
I am getting this error The value
"#CREATEODBCDATE(StartDate)#" could not be converted to a date. I
used different methods including the Now() function but getting
always the converted to a date error. The database fields are set
to datetime format with length of 8 bits. The database is sql
server database and the date format I use is
=dateformat(now(),"mm-dd-yyyy")&timeformat(now(),"hh:mm:ss ".
The actual time format the datbase us is the same format except
there is AM or PM after the time, is this one of the reasons?
Thanks for your help.

In my SQL Server inserts I insert a date like the the NOW()
function
as
insert into table (col1, date1) values ('texthere', GETDATE()
your issue may be that the insert, update, or delete needs to
be an SQL
command, not
a coldfusion one Coldfusion's now() --> SQL Server's
getdate()
For Updates or deletes, where I want to match a date, I let
CF do a bit of
the work inside the
sql statement....
update table set datefield = <cfqueryparam
cfsqltype="cf_sql_date"
value='#meetdate#'>
(where '#meetdate#' is the form date or date that I want to
update. CF then
verifies it is a proper date structure before attemptint to
save to the SQL
SErver datetime field :)
HTH,
DixieGAl
(although I
"hannash" <[email protected]> wrote in message
news:e98p4j$brc$[email protected]..
| Hi there,
|
| I am getting this error The value
"#CREATEODBCDATE(StartDate)#" could not
be
| converted to a date. I used different methods including the
Now()
function but
| getting always the converted to a date error. The database
fields are set
to
| datetime format with length of 8 bits. The database is sql
server database
and
| the date format I use is
|
=dateformat(now(),"mm-dd-yyyy")&timeformat(now(),"hh:mm:ss ".
The actual
time
| format the datbase us is the same format except there is AM
or PM after
the
| time, is this one of the reasons?
|
| Thanks for your help.
|

Similar Messages

  • Im using xcode 4.6 and im having problems reading files using the fopen function in c

    Im using xcode 4.6 and im having problems reading files using the fopen function in c

    Yes, but that would not cause the "build  failed" message.
    right I missed that part. Looks like two problems then.
    //  main.m
    //  ASCTestFopen
    //  Created by Frank Caggiano on 3/2/13.
    //  Copyright (c) 2013 Frank Caggiano. All rights reserved.
    #import <Foundation/Foundation.h>
    #include <stdio.h> 
    int main(int argc, const char * argv[])
        @autoreleasepool {
            FILE *fp, *fopen();
            // insert code here...
            if((fp = fopen("~/test.txt","r")) == NULL)
                NSLog(@"open failed");
        return 0;
    This will compile ad run in Xcode with a project type of comand line tool

  • Need help in knowing how to debug the data using the data monitor

    Hi All,
      I am working on the BW3.X system,
    In my system instead of directly mapping the currency field in the update rule between DSO and the INFOCUBE, they have done it indirectly(I am unable to see that field getting mapped to any field), I want to know from which keyfigure it is fetching the currency unit.
    How can I know from which keyfigure this currency unit field is fetching the unit type.
    Please give me your valuable suggestion.
    Thanks with regards,
    vinay.
    Edited by: vinaykumarhs on Apr 7, 2010 12:31 PM
    Edited by: vinaykumarhs on Apr 7, 2010 12:32 PM

    yes, there are few fields for which unit calculations are being done through the routines, but there are still many for which it is directly mapped.
    UP to dso, we have changed from its loclal currency to group currency, but for my infocubes, few records are taking group currency and still many are taking local currency type only.

  • Problem with JFMERGE using the last set of data on all form sets

    b Here is the scenario...
    I have a file of data in character delimited format. Each record needs to produce the same set of forms. I used the Visual Transformation Editor to define the field nominated data file, including the ^form statements. The transformation agent processes the file of multiple records just fine. I get a file from JFTRANS that contains the set of data & form statements repeated for each record in the file.
    Great so far.
    b Here is the problem...
    Unfortunately, the print agent is repeating the same set of data on every copy of the set of forms that is printed. It uses the data from the last set of forms to be printed.
    b Additional information...
    For ease of building the field nominated file by our custom client program we have standardized on using GLOBAL fields. Therefore, our DAT files contain all the ^global declarations with all the necessary ^form statements at the end. I used the transformation editor to build the same type of file. Therefore the file going to the print agent looks like:
    ^global name1
    data1
    ^global name2
    data2
    ^form form1
    ^form form2
    ^global name1
    newdata1
    ^global name2
    newdata2
    ^form form1
    ^form form2
    The printed result puts "newdata1" & "newdata2" on both sets of form2. Strangely, the correct data values are showing up on both sets of form1.
    The only difference between the two forms is that form1 is not defined with the fields as global where form2 does define them as global. I removed the global flag from form2 but that didn't change anything.
    I think I know what is occurring. JFMERGE is putting the data elements into the global dictionary and when the same name is in the file the latest data value ends up in the dictionary (thus all the forms print using the last data put into the dictionary). I certainly didn't expect this. I thought it would load the dictionary and print the first set of forms, then reload the dictionary and print the next set of forms. At least that is the way I see it occuring based on the order of things in the DAT file. Based on what is occuring it appears that JFMERGE reads the whole DAT file, building the dictionaries and then processes all the ^form statements.
    b My request for help...
    Does anyone know what I can do (such as insert some command) to get the correct data on the forms?
    It looks like using a fixed record format might do the trick but that isn't an option at this time. As things are right now it looks like I'm going to have to take the data file apart, and make lots of files with one line of data per file.
    I have a time deadline to get this printed so if there isn't a way to make JFMERGE operate as I expected it looks like I'll be doing this by hand. Fortunately, there are only 250-300 data lines. Future jobs could have thousands of data lines so if there isn't a way to do it with a multi-line data file I'll have someone create a program for splitting the original file up (and adding the ^job line).

    We don't use subforms so some of what you suggest isn't effective for us. Our forms are a duplication of the paper forms and are not dynamic. We design each form separately and our custom filler software (that builds the DAT file) uses a database with the required forms for each print job defined within it.<br /><br />Since we don't have subforms, our simple method of printing is to declare as GLOBAL all the unique fields used on all the forms to be printed followed by the ^form commands. It was a simple & straightforward method for us to do better than 500 print jobs over that past couple of years. In addition, our custom filler software can easily build the DAT files.<br /><br />Because I need to manually declare all the ^form statements my experience with using ^field is that the form must be declared followed by the appropriate field commands (repeat for all the forms).<br /><br />i <many hours later I continue typing this post><br /><br />Taking the original Transformation Definition File and customizing it for how things need to be when using ^field commands was a time consuming experience (and a learning one). It did the job as I needed but it is an experience I don't want to repeat. There has got to be a better way of building the TDF properly. I'm definately leaning towards a program to split the file into multiple files.<br /><br />Here is what I went through...<br /><br />I did all the editting using Notepad. I changed all ^global to ^field. Then I had to remove the #comment lines. Next was to find any references to fields that had to be global to the top and chang ^field to ^global. Then it was moving the fields around so they were underneath the appropriate ^form statement. Then, since one of the forms was multi-page I had to add the ^page command and sort the fields so they were under the correct page. That was followed by duplicating fields that are used on multiple forms or multiple pages. Then I discovered that the print agent won't do ^page unless "inline processing" is turned off (I did not want to specify the page name as it could change over time) - so I added "^inline off" in front of every ^page. Finally it was removing unecessary field references so the log file would be clean.<br /><br />For those that are interested, the following is an example of my final file. <br /><br />^global nameA<br />data<br />^global nameB<br />data<br />^form nameX<br />^field name1<br />data<br />^field name2<br />data<br />^form nameY<br />^field name1<br />data<br />^field name3<br />data<br />^inline off<br />^page<br />^field name4<br />data<br />^field name1<br />^inline off<br />^page<br />^field name5<br />data<br />^field name6<br />data

  • In the numbers app, using the "date and time" function, is it possible to remove the time? I need to put together a list of dates, but I don't need or want times.

    In the numbers app, using the "date and time" function, is it possible to remove the time? I need to put together a list of dates, but I don't need or want times.

    When formatting your column to date/time, pick Date & time, and then pick the letter i in the circle to the right. Then scroll down and pick "No time"
    Jason

  • Breaking Links to and External Data Connection using the cubevalue() function

    I have spreadsheets that connect to an MSAS cube successfully and pull data in the cells using the CUBEVALUE function.
    Is there a way to perform the equivalent of 'breaking links' to the external database so that the spreadsheet can be distibuted to others that will not have the external database connection set up on their computer/excel environment.
    I find that if i email a spreadsheet with data retreived using cubevalue functions to someone without the external database connection they do not see the values preserved with the spreadsheet and end up with blank or zero cells, etc.
    I have unchecked the box related to 'refresh data when opening file'.
    In a perfect world i would like to remove the db connection and be left with pasted values, similar to breaking links to an external workbook but I am not sure if that is possible.
    I am desperate to find a way to distribute these spreadsheets and be confident that Excel won't be unsuccessfully trying to refresh a connection that isn't on other peoples computer.
    Thanks for any guidance

    Maybe you can upload a sample file to a file sharing site and then share the link with us.
    As you said you have already unchecked the option 'Refresh data when opening the file' within Connection Properties.
    When you send the Excel file to someone without this data connection, they should get the correctly data unless they click the button 'Refresh All'.
    Wind Zhang
    TechNet Community Support

  • Problem inserting and querying XML data with a recursive XML schema

    Hello,
    I'm facing a problem with querying XML data that is valid against a recursive XML Schema. I have got a table category that stores data as binary XML using Oracle 11g Rel 2 on Windows XP. The XML Schema is the following:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:complexType name="bold_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="keyword_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
                   <xs:element name="plain_text" type="xs:string"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="emph_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="text_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="parlist_type">
              <xs:sequence>
                   <xs:element name="listitem" minOccurs="0" maxOccurs="unbounded" type="listitem_type"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="listitem_type">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="parlist" type="parlist_type"/>
                   <xs:element name="text" type="text_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:element name="category">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="name"/>
                        <xs:element name="description">
                                  <xs:complexType>
                                            <xs:choice>
                                                           <xs:element name="text" type="text_type"/>
                                                           <xs:element name="parlist" type="parlist_type"/>
                                            </xs:choice>
                                  </xs:complexType>
                        </xs:element>
                                                                </xs:sequence>
                                                                <xs:attribute name="id"/>
                                            </xs:complexType>
                        </xs:element>
    </xs:schema>I registered this schema and created the category table. Then I inserted a new row using the code below:
    insert into category_a values
    (XMlElement("category",
          xmlattributes('categoryAAA' as "id"),
          xmlforest ('ma categ' as "name"),
          (xmlelement("description", (xmlelement("text", 'find doors blest now whiles favours carriage tailor spacious senses defect threat ope willow please exeunt truest assembly <keyword> staring travels <bold> balthasar parts attach </bold> enshelter two <emph> inconsiderate ways preventions </emph> preventions clasps better affections comes perish </keyword> lucretia permit street full meddle yond general nature whipp <emph> lowness </emph> grievous pedro')))    
    The row is successfully inserted as witnessed by the results of row counting. However, I cannot extract data from the table. First, I tried using SqlPlus* which hangs up and quits after a while. I then tried to use SQL Developer, but haven't got any result. Here follow some examples of queries and their results in SQL Developer:
    Query 1
    select * from category
    Result : the whole row is returned
    Query 2
    select xmlquery('$p/category/description' passing object_value as "p" returning content) from category
    Result: "SYS.XMLTYPE"
    now I tried to fully respect the nested structure of description element in order to extract the text portion of <bold> using this query
    Query 3
    select  xmlquery('$p/category/description/text/keyword/bold/text()' passing object_value as "p" returning content) from  category_a
    Result: null
    and also tried to extract the text portion of element <text> using this query
    Query 4
    select  xmlquery('$p/category/description/text/text()' passing object_value as "p" returning content) from  category_a
    Result: "SYS.XMLTYPE".
    On the other hand, I noticed, from the result of query 1, that the opening tags of elements keyword and bold are encoded as the less than operator "&lt;". This explains why query 3 returns NULL. However, query 4 should display the text content of <text>, which is not the case.
    My questions are about
    1. How to properly insert the XML data while preserving the tags (especially the opening tag).
    2. How to display the data (the text portion of the main Element or of the nested elements).
    The problem about question 1 is that it is quite unfeasible to write a unique insert statement because the structure of <description> is recursive. In other words, if the structure of <description> was not recursive, it would be possible to embed the elements using the xmlelement function during the insertion.
    In fact, I need to insert the content of <description> from a source table (called category_a) into a target table (+category_b+) automatically .
    I filled category_a using the Saxloader utility from an flat XML file that I have generated from a benchmark. The content of <description> is different from one row to another but it is always valid with regards to the XML Schema. The data is properly inserted as witnessed by the "select * from category_a" instruction (500 row inserted). Besides, the opening tags of the nested elements under <description> are preserved (no "&lt;"). Then I wrote a PL/SQL procedure in which a cursor extracts the category id and category name into varchar2 variables and description into an XMLtype variable from category_a. When I try to insert the values into a category_b, I get the follwing error:
    LSX-00213: only 0 occurrences of particle "text", minimum is 1which tells that the <text> element is absent (actually it is present in the source table).
    So, my third question is why are not the tags recognized during the insertion?
    Can anyone help please?

    Hello,
    indded, I was using an old version of Sqlplus* (8.0.60.0.0) because I had a previous installation (oracle 10g XE). Instead, I used the Sqlplus* shipped with the 11g2database (version 11.2.0.1.0). All the queries that I wrote work fine and display the data correctly.
    I also used the XMLSERIALIZE function and can now display the description content in SQL Developer.
    Thank you very much.
    To answer your question Marco, I registered the XML Schema using the following code
    declare
      doc varchar2(4000) := '<?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:complexType name="bold_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="keyword_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
                   <xs:element name="plain_text" type="xs:string"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="emph_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="text_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="parlist_type">
              <xs:sequence>
                   <xs:element name="listitem" minOccurs="0" maxOccurs="unbounded" type="listitem_type"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="listitem_type">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="parlist" type="parlist_type"/>
                   <xs:element name="text" type="text_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:element name="category">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="name"/>
                        <xs:element name="description">
                                  <xs:complexType>
                                            <xs:choice>
                                                           <xs:element name="text" type="text_type"/>
                                                           <xs:element name="parlist" type="parlist_type"/>
                                            </xs:choice>
                                  </xs:complexType>
                        </xs:element>
                                                                </xs:sequence>
                                                                <xs:attribute name="id"/>
                                            </xs:complexType>
                        </xs:element>
    </xs:schema>';
    begin
      dbms_xmlschema.registerSchema('/xmldb/category_auction.xsd', doc,     LOCAL      => FALSE, 
            GENTYPES   => FALSE,  GENBEAN    => FALSE,   GENTABLES  => FALSE,
             FORCE      => FALSE,
             OPTIONS    => DBMS_XMLSCHEMA.REGISTER_BINARYXML,
             OWNER      => USER);
    end;then, I created the Category table as follows:
    CREATE TABLE category_a of XMLType XMLTYPE store AS BINARY XML
        XMLSCHEMA "xmldb/category_auction.xsd" ELEMENT "category";Now, there still remains a problem of how to insert the "description" content which I serialized as a CLOB data into another table as XML. To this purpose, I wrote a view over the Category_a table as follows:
    CREATE OR REPLACE FORCE VIEW "AUCTION_XWH"."CATEGORY_V" ("CATEGORY_ID", "CNAME", "DESCRIPTION") AS
      select category_v."CATEGORY_ID",category_v."CNAME",
      XMLSerialize(content ( xmlquery('$p/category/description/*' passing object_value as "p" returning content)) as clob) as "DESCRIPTION"
      from  auction.category_a p, 
    xmltable ('$a/category' passing p.Object_Value as "a"
    columns  category_id varchar2(15) path '@id',
              cname varchar2(20) path 'name') category_v;Then, I wrote a procedure to insert data into the Category_xwh table (the source and target tables are slightly different: the common elements are just copied wereas new elements are created in the target table). The code of the procedure is the following:
    create or replace PROCEDURE I_CATEGORY AS
    v_cname VARCHAR2(30);
    v_description clob ;
    v_category_id VARCHAR2(15);
    cursor mycursor is select category_id, cname, description from category_v;
    BEGIN
    open mycursor;
      loop
      /*retrieving the columns*/
      fetch mycursor into v_category_id, v_cname, v_description ;
      exit when mycursor%notfound;
      insert into category_xwh values
      (XMlElement("category",
          xmlattributes(v_category_id as "category_id"),
          xmlelement("Hierarchies", xmlelement("ObjHierarchy", xmlelement ("H_Cat"),
                                                               xmlelement ("Rollsup",
                                                                                  (xmlelement("all_categories",
                                                                                   xmlattributes('allcategories' as "all_category_id")))
        xmlforest (
                  v_cname as "cat_name",
                  v_description as "description")    
    end loop;
      commit;
      close mycursor;
    END I_CATEGORY;When I execute the procedure, I get the following error:
    LSX-00201: contents of "description" should be elements onlyso, I just wonder if this is because v_description is considered as plain text and not as XML text, even if its content is XML. Do I need to use a special function to cast the CLOB as XML?
    Thanks for your help.
    Doulkifli

  • Featching Data From The Data Base Using DI API in Matrix

    Hi
       All of u i am shahid i faced a problem when i retrive
       the selected data from the data base using matrix plz.
       Healp me!.
       Thanks
       Mohd Shahid.
       SAP Techinical Consultent
      Option Strict Off
    Option Explicit On
    Friend Class UseMatrix
        '// This parameter will use us to manipulate the
        '// SAP Business One Application
        Private WithEvents SBO_Application As SAPbouiCOM.Application
        Private oForm As SAPbouiCOM.Form
        Private oMatrix As SAPbouiCOM.Matrix
        Private oColumns As SAPbouiCOM.Columns
        Private oColumn As SAPbouiCOM.Column
        '// declareing a DB data source for all the Data binded columns
        Private oDBDataSource As SAPbouiCOM.DBDataSource
        '// declaring a User data source for the "Remarks" Column
        Private oUserDataSource As SAPbouiCOM.UserDataSource
        ' This Function is called automatically when an instance
        ' of the class is created.
        ' Indise this function
        Public Sub New()
            MyBase.New()
            '// set SBO_Application with an initialized application object
            SetApplication()
            '// Create the UI
            CreateFormWithMatrix()
            '// Add Data Sources to the Form
            AddDataSourceToForm()
            '// Bind the Form's items with the desired data source
            BindDataToForm()
            '// Load date to matrix
            GetDataFromDataSource()
            '// Make the form visible
            oForm.Visible = True
        End Sub
        Private Sub SetApplication()
            '// Use an SboGuiApi object to establish connection
            '// with the SAP Business One application and return an
            '// initialized appliction object
            Dim SboGuiApi As SAPbouiCOM.SboGuiApi
            Dim sConnectionString As String
            SboGuiApi = New SAPbouiCOM.SboGuiApi
            '// by following the steps specified above, the following
            '// statment should be suficient for either development or run mode
            sConnectionString = Environment.GetCommandLineArgs.GetValue(1)
            '// connect to a running SBO Application
            Try ' If there's no active application the connection will fail
                SboGuiApi.Connect(sConnectionString)
            Catch ' Connection failed
                System.Windows.Forms.MessageBox.Show("No SAP Business One Application was found")
                End
            End Try
            '// get an initialized application object
            SBO_Application = SboGuiApi.GetApplication()
            'SBO_Application.MessageBox("Hello World")
        End Sub
        Private Sub SBO_Application_AppEvent(ByVal EventType As SAPbouiCOM.BoAppEventTypes) Handles SBO_Application.AppEvent
            Select Case EventType
                Case SAPbouiCOM.BoAppEventTypes.aet_ShutDown
                    SBO_Application.MessageBox("A Shut Down Event has been caught" & _
                        Environment.NewLine() & "Terminating 'Add Menu Item' Add On...")
                    '// terminating the Add On
                    System.Windows.Forms.Application.Exit()
            End Select
        End Sub
        Private Sub CreateFormWithMatrix()
            '// Don't Forget:
            '// it is much more efficient to load a form from xml.
            '// use code only to create your form.
            '// once you have created it save it as XML.
            '// see "WorkingWithXML" sample project
            '// we will use the following object to add items to our form
            Dim oItem As SAPbouiCOM.Item
            '// we will use the following objects to set
            '// the specific values of every item
            '// we add.
            '// this is the best way to do so
            Dim oButton As SAPbouiCOM.Button
            Dim oStaticText As SAPbouiCOM.StaticText
            Dim oEditText As SAPbouiCOM.EditText
            '// The following object is needed to create our form
            Dim creationPackage
            creationPackage = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
            creationPackage.UniqueID = "UidFrmMatrix14"
            creationPackage.FormType = "TypeFrmMatrix14"
            '// Add our form to the SBO application
            oForm = SBO_Application.Forms.AddEx(creationPackage)
            '// Set the form properties
            oForm.Title = "Quality Check"
            oForm.Left = 336
            oForm.ClientWidth = 620
            oForm.Top = 44
            oForm.ClientHeight = 200
            '// Adding Items to the form
            '// and setting their properties
            '// Adding an Ok button
            '// We get automatic event handling for
            '// the Ok and Cancel Buttons by setting
            '// their UIDs to 1 and 2 respectively
            oItem = oForm.Items.Add("1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 5
            oItem.Width = 65
            oItem.Top = 170
            oItem.Height = 19
            oButton = oItem.Specific
            oButton.Caption = "Ok"
            '// Adding a Cancel button
            oItem = oForm.Items.Add("2", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 75
            oItem.Width = 65
            oItem.Top = 170
            oItem.Height = 19
            oButton = oItem.Specific
            oButton.Caption = "Cancel"
            '// Adding a Text Edit item
            'oItem = oForm.Items.Add("txtPhone", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            ' oItem.Left = 265
            'oItem.Width = 163
            'oItem.Top = 172
            'oItem.Height = 14
            '// Adding an Add Phone prefix column button
            ' oItem = oForm.Items.Add("BtnPhone", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            ' oItem.Left = 160
            ' oItem.Width = 100
            ' oItem.Top = 170
            ' oItem.Height = 19
            ' oButton = oItem.Specific
            ' oButton.Caption = "Add Phone prefix"
            '// Add the matrix to the form
            AddMatrixToForm()
        End Sub
        Private Sub AddMatrixToForm()
            '// we will use the following object to add items to our form
            Dim oItem As SAPbouiCOM.Item
            '// we will use the following object to set a linked button
            Dim oLink As SAPbouiCOM.LinkedButton
            '// Adding a Matrix item
            oItem = oForm.Items.Add("Matrix1", SAPbouiCOM.BoFormItemTypes.it_MATRIX)
            oItem.Left = 5
            oItem.Width = 500
            oItem.Top = 5
            oItem.Height = 150
            oMatrix = oItem.Specific
            oColumns = oMatrix.Columns
            '// Adding Culomn items to the matrix
            oColumn = oColumns.Add("#", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            oColumn.TitleObject.Caption = "#"
            oColumn.Width = 30
            oColumn.Editable = False
            '// Add a column for Item Code
            oColumn = oColumns.Add("DSItemCode", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON)
            oColumn.TitleObject.Caption = "Item Code"
            oColumn.Width = 40
            oColumn.Editable = True
            '// Link the column to the ITEM master data system form
            oLink = oColumn.ExtendedObject
            oLink.LinkedObject = SAPbouiCOM.BoLinkedObject.lf_Items
            oColumn = oColumns.Add("DSItemName", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            oColumn.TitleObject.Caption = "Item Name"
            oColumn.Width = 80
            oColumn.Editable = True
            '// Add a column for BP Card Phone
            oColumn = oColumns.Add("DSWhs", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            oColumn.TitleObject.Caption = "Ware House"
            oColumn.Width = 40
            oColumn.Editable = True
            '// Add a column for BP Card Phone
            oColumn = oColumns.Add("DSQuantity", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            oColumn.TitleObject.Caption = "Quantity"
            oColumn.Width = 40
            oColumn.Editable = True
            '// Add a column for Combo Box
            oColumn = oColumns.Add("DSQuality", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX)
            oColumn.TitleObject.Caption = "Quality"
            ' oColumn.ValidValues.Add("OK", "")
            'oColumn.ValidValues.Add("NOT OK", "")
            oColumn.Width = 40
            oColumn.Editable = True
            oColumn = oColumns.Add("DSReport", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            oColumn.TitleObject.Caption = "Remarks"
            ' oColumn.ValidValues.Add("OK", "")
            'oColumn.ValidValues.Add("NOT OK", "")
            oColumn.Width = 40
            oColumn.Editable = True
            '// Add a column for BP Card Phone
            ' oColumn = oColumns.Add("DSPhoneInt", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            ' oColumn.TitleObject.Caption = "Int. Phone"
            'oColumn.Width = 40
            'oColumn.Editable = True
        End Sub
        Public Sub AddDataSourceToForm()
            '// every item must be binded to a Data Source
            '// prior of binding the data we must add Data sources to the form
            '// Add user data sources to the "International Phone" column in the matrix
            ' oUserDataSource = oForm.DataSources.UserDataSources.Add("IntPhone", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 20)
            '// Add DB data sources for the DB bound columns in the matrix
            oDBDataSource = oForm.DataSources.DBDataSources.Add("OITW")
        End Sub
        Public Sub BindDataToForm()
            '// getting the matrix column by the UID
            oColumn = oColumns.Item("DSItemCode")
            'oColumn.DataBind.SetBound(True, "", "DSCardCode")
            oColumn.DataBind.SetBound(True, "OITW", "ItemCode")
            'oColumn = oColumns.Item("DSItemName")
            'oColumn.DataBind.SetBound(True, "OITW", "ItemName")
            oColumn = oColumns.Item("DSWhs")
            oColumn.DataBind.SetBound(True, "OITW", "WhsCode")
            oColumn = oColumns.Item("DSQuantity")
            oColumn.DataBind.SetBound(True, "OITW", "U_QCStock")
            '// to Data Bind an item with a user Data source
            '// the table name value should be an empty string
            ' oColumn = oColumns.Item("DSPhoneInt")
            'oColumn.DataBind.SetBound(True, "", "IntPhone")
        End Sub
        Public Sub GetDataFromDataSource()
            '// Ready Matrix to populate data
            oMatrix.Clear()
            oMatrix.AutoResizeColumns()
            '// Querying the DB Data source
            oDBDataSource.Query()
            '// setting the user data source data
            'oUserDataSource.Value = "Phone with prefix"
            oMatrix.LoadFromDataSource()
        End Sub
        Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
            If (pVal.FormUid = "UidFrmMatrix") Then
                If ((pVal.itemUID = "BtnPhone") And _
                    (pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) And _
                    (pVal.Before_Action = False)) Then
                    AddPrefix()
                End If
                If ((pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD) And _
                    (pVal.Before_Action = False)) Then
                    SBO_Application.MessageBox("Form Unloaded, Addon will terminate")
                    System.Windows.Forms.Application.Exit()
                End If
            End If
        End Sub
        Public Sub AddPrefix()
            Dim i As Integer
            Dim PhoneExtCol As SAPbouiCOM.Column
            Dim newPhone As String
            Dim oItem As SAPbouiCOM.Item
            Dim oEditTxt As SAPbouiCOM.EditText
            '// Get the prefix edit text item
            oItem = oForm.Items.Item("txtPhone")
            oEditTxt = oItem.Specific
            '// Flush user input into datasources
            oMatrix.FlushToDataSource()
            '// Get the DBdatasource we base the matrix on
            oDBDataSource = oForm.DataSources.DBDataSources.Item("OCRD")
            '// Iterate all the records and add a prefix to the phone
            For i = 0 To oDBDataSource.Size - 1
                newPhone = oDBDataSource.GetValue("phone1", i)
                newPhone = newPhone.Trim(" ")
                oDBDataSource.SetValue("phone1", i, oEditTxt.String + newPhone)
            Next
            '// Load data back to
            oMatrix.LoadFromDataSource()
        End Sub
    End Class

    Hi Shahid,
    I am not sure what your question is. The code you pasted looks like the MatrixAndDataSources example that comes with the SDK. What are you trying to do?
    Thanks,
    Adele

  • Getting error while using the data element in ztable

    though i specified the length as 20 in dataelement when i am entering the dataelement i am getting this error
    while i used help i got the following information
    Number of positions < minimum number (1) for data type CHAR
    Message no. DO253
    Diagnosis
    A minimum length is required for the specified data type.
    This minimum length is not reached by the specified number of positions.
    Procedure
    Increase the number of positions or select a more appropriate data type with the possible entries help F4.

    This is strange, you shouldn't even be able to activate the dataelement type char with a length of 0. Revisit your data element and make sure that the length shows to be greater than 0 and reactivate your data element to make sure the newest version is active. In case you are referencing a domain in your data element do the same with the domain after validating that everything is correct (you can also use the check function). Then go back to your table and reenter the data element before activating your table.
    Hope that helps,
    Michael

  • Hot to use the data grid to edit column objects

    I have a simple object type:
    CREATE OR REPLACE TYPE TIMESLICE AS OBJECT
    SINCE TIMESTAMP (6),
    UNTIL TIMESTAMP (6)
    And a simple table with one column containing objects of this type:
    CREATE TABLE TABLE1
    COLUMN1 TIMESLICE
    I can insert into the table:
    INSERT INTO SLICES VALUES (timeslice (NULL, NULL));
    But when I try to use the data grid and write there the same string "timeslice (NULL, NULL)" as value I get the following error during commit:
    One error saving changes to table "TABLE1":
    Row 1: ORA-06550: line 1, column 55:
    PL/SQL: ORA-00932: inconsistent datatypes: expected UDT got CHAR
    ORA-06550: line 1, column 7:
    PL/SQL: SQL Statement ignored
    The data grid interprets the value as characters instead of an expression.
    How do I have to enter the object in the data grid?

    Is it possible to access the cache datasource inside the script component which is available in the same data flow task??
    Thanks in advance,
    Saravanan

  • How to use the data that we got after successful execution of a Bapi

    I have created a simple Webdynpro application to execute a user defined Bapi and that was executing successfully but the next step when i want to use the data that which i have retrieved from that Bapi i am facing problem.I am unable to use that particular data
    My idea is to use that data and again i want to filter that particular data which i got from the Bapi execution with out calling another Bapi
    Ex: I wrote a user defined Bapi to retrieve flight details if i enter the id of the particular airline
    Then i executed my webdynpro application and i am able to get the output
    from that output i want a particular flight details if i choose the City name i.e. the details related to that particular city which i choose

    Hi Praveen,
    Thanks for the Help,
    I am working with the same scenario which was there in the PDF sent by you but in that document it was directly allowing us to click on the output which we got after executing a Bapi, but here when i am executing i didn't know the procedure how to make use of the data which we got after execution and displaying it in other view
    can we write any code to access that particular data that we got after executing that flight scenario and do some operations on that particular fields
    thanks and regards
    Raghu

  • How to insert the data if the data in the two tables doesn't match.

    Hi,
    I have requirement like,I have to insert the data by comparing the two tables based on the date field.If they both are equal then the data shouldn't be inserted if not the data has to be inserted.
    Can some one help me on this ASAP.
    Regards,
    Sudha
    sudha

    Hi,
    Thanks for the reply,i would like to know the way that we can design the packages
    sudha
    You have multiple ways of implementing this
    1. Using Lookup Task
    http://www.sqlis.com/sqlis/post/Get-all-from-Table-A-that-isnt-in-Table-B.aspx
    2. using SCD wizard
    http://www.bimonkey.com/2009/07/the-slowly-changing-dimension-transformation-part-1/
    3. using hashing
    http://visakhm.blogspot.in/2014/06/ssis-tips-implementing-scd.html
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • I want to update the Custom table using the data available in ITAB.

    Hi,
    I want to updaste the Custom Table which is created by me (Ztable) using the data available in itab.(which i got from defferent standard tables)
    I want to update the custom table using the itab data How is it possible?
    Is any possible by using Modify ?
    DPK.

    example here
    modifying datbase table useing internal table
    advises before updating this datbase table plz lock that table to avoid incosistency
    write the logic for modifying
    Modify the database table as per new dunning procedure
    MODIFY fkkvkp FROM TABLE lt_fkkvkp .
    and finally unlock the table
    example
    *To lock table for further operations
    constants: lc_tabname TYPE rstable-tabname VALUE 'FKKVKP' . "FKKVKP
    CALL FUNCTION 'ENQUEUE_E_TABLE'
    EXPORTING
    tabname = lc_tabname
    EXCEPTIONS
    foreign_lock = 1
    system_failure = 2
    OTHERS = 3.
    IF sy-subrc EQ 0.
    To fetch all the contract accounts for customers of the segment
    Households/SME.
    PERFORM fetch_contract_accounts using lc_tabname .
    ENDIF. " IF sy-subrc EQ 0.
    *wrote the logic
    Modify the database table as per new dunning procedure from internal table
    MODIFY fkkvkp FROM TABLE lt_fkkvkp .
    *unlock the tbale
    CALL FUNCTION 'DEQUEUE_E_TABLE'
    EXPORTING
    TABNAME = uc_tabname .

  • Problem during extraction using generic data sources

    Hi
    While performing extraction(master data)  using generic data sources I am getting a problem.
    while selecting application component, I am unable to find SD to select it.What should I do?
    I selected CRM as application component and did the extraction , it is successful.
    But what about if we want to select SD? I am guessing it as an installation problem ... Anyone plz help me
    Thank you
    Deepthi

    Hi Deepthi,
    Looks like the RFC connection between source system and BW system is broken..
    Contact your basis team to check the connection what went wrong.
    once the connection is re-established you can gohead ...
    Try out this procedure
    Type Transaction SM59.
    a.) Open the RFC Destinations.
    b.) Find your Source System and double click on it.
    c.) Technical setting should contain information regarding your source
    system
    d.) Logon Information should contain source system client and name &
    password for you remote logon.
    **Suggestion : our remote name for our R/3 was ALEREMOTE. We use
    BWREMOTE so that we can monitor without confusion.
    e.) Execute your 'Test Connection' & 'Remote Logon'. You connection
    should be You should NOT be prompted for a password.
    f.) Repeat above to verify RFCs for other systems
    regards
    KP
    Edited by: KP on Dec 14, 2009 12:11 PM

  • Can you use the data while NOT on the EDGE network?

    I am wondering if when I travel through SD and ND I will be able to use my data (email, web, maps...etc.) I am in Minneapolis on the EDGE network, but I'm concerned that in Sioux Falls, SD no a GPRS network I won't be able to use 1/2 the functions on my phone.
    Before release the rumor was that it would work, but has anyone actually tried it yet?

    So essentially you're asking... if there's no Wi-Fi or EDGE coverage will you be able to use the data network features of the phone?
    In short... from my experience the answer appears to be "no, it won't work." Allow me to elaborate:
    I disabled Wi-Fi access and found an EDGE dead spot where the phone could not connect to the EDGE data network but I could place a phone call. When I attempted to launch Mail and sync, I got a message saying that my IMAP server could not be reached. When attempted to launch a website, I received an error message stating that the server could not be reached.
    End result, I was unable to use any of the data network features of the phone. So it would appear... that the answer is no. It will not use the basic GPRS undearlining network. However it's quite possible that your results may vary.

Maybe you are looking for

  • Hard-drive seems to be constantly in use?

    Hello, I've recently bought the Lenovo Idea Centre K430 and while I have been very pleased with it to date I've noticed that the white hard-drive light on the top of the box is constantly flashing even if I'm not doing much with the computer and I wa

  • Performace of XI system

    1. How to check the performance of Xi system? 2. How to Scedule the Scenarios in Xi? 3. Why Idoc and Http adapters dont have sender agreement ? 4. How to test Xi scenario? 5. What is moduling concept in XI?

  • How to enable Logon Help link in Login Page?

    Hi, I need to implement the logon help like forgot password / password reset...in the portal login page the link is not showing...what to do to enable this Login Help Link in Portal login page? can you please guide me on this... Regards, Viswes

  • How do i get the date off the photo?

    On my iPad the photos look great (no date appears), but when I email them or upload them to Facebook they get a date stamped on them.  Is this a setting I can change?  I don't want the date printed on the image- it ruins the whole picture:

  • Laptop Updates Failure

    HP Laptop Pavilion 14-b010us Laptop automatically tries to download updates and frequently fails: (1) Repeated failure of windows and other updates and (2) Repeated failure to update to Windows 8.1