How to Find the Data Type of the Field In a Database Table

Hi Experts,
I'm currently working on a program which needs to find out the data type of the given field in a database table. In addition to accessing DD03L directly, is there any other workaround such as function module to help me achieve this? It would be helpful if a demo example could be provided.
Thanks a lot.

Hi,
Use this..
DESCRIBE FIELD dobj  TYPE typ.
write typ.
type will contain the data type of the object.
and check this thread also....
Re: How to get datatype of fields in dynamic structures
Cheers,
Simha.
Reward all the helpful answers..

Similar Messages

  • How to change the data  type of a field in an internal table dynamically ?

    I have an internal table :
    Data: Begin of itab_data occurs 0,
    field1 type i,
    field2 type p decimals 2,
    end of itab_data.
    My requirement is to decide the number of decimals of "field2" dynamically .
    ie. based on the input in selection-screen , the declaration has to change .How can this be done ?
    Hope the question is clear..
    Its urgent. Please help me.
    Thanks in advance .
    Shankar

    I dont think you can change it dynamically...but as per your requirement ...why dont you define the variable with maximum decimal length and depending on the parameter(from your selection-screen) use the WRITE command to populate it with the specified decimals.
    Example
    begin of itab
    field2 type p decimals 5.
    end of itab.
    write itab-field2 to lfield decimals p_dec.
    Message was edited by: Anurag Bankley

  • How to find out which type of the driver is used in our application?

    Hi all,
    can anyone tell me how to find out which type of the driver is used in our application?
    Thanks in advance,
    Phoeniox

    Hi,
    Check out this...
    Class.forName("com.mysql.jdbc.Driver"); //if u r using MySql
    List drivers = Collections.list(DriverManager.getDrivers());
                   for(int i=0;i<drivers.size();i++)
                        Driver driver = (Driver)drivers.get(i);
                        String driverName = driver.getClass().getName();
                        System.out.println("Driver "+i+":::"+driverName);
    you need to load the driver and display in the same program.
    Then only you'l get the required result.
    prakhyath

  • How can I read the data type of a field in an MS Access database

    I need to be able to determine if a field in an Access database is of a certain data type, and if it isn't, to change it to what it should be.
    I can't seem to find any way of reading the data type of any field in any table - can anyone give me a metod of getting this info?
    Thanks
    ..Bob

    Does <cfdbinfo> work for Access DBs?
    You might be better off asking this on a MS Access forum.  It's more of an Access issue than a CF one.
    Adam

  • How to change the data type in the table ESLL for the field USERF2_NUM ?

    Hello Friends,
    I have a requirement in which one of the change is to convert the data type of the field 'USERF2_NUM' in the table 'ESLL'  from 'QUAN' to 'CHAR'. 
    How do i do it if i have an access to change it..........i think i should also check the impact of the change if done.
    Kindly tell me as my requirement starts with this small change.
    Regards,
    Rajesh Kumar

    Thanks for the reply Sowmya.
    I would like to know 2 things.
    1. Is it ok to change the data type of the field 'USERF2_NUM '  which is in the table ESLL. from quan to char.
    2.  The table ESLL  already has entries. if we change the data type from QUAN to CHAR what is the  effect on the existing entries of the table .
    Kindly reply me back.
    Thanks & Regards,
    Rajesh Kumar

  • Any idea what this errorr means? the data type of the reference does not match the data type of the variable

    I am using Veristand 2014, Scan Engine and EtherCat Custom Device.  I have not had this error before, but I was trying to deploy my System Definition File (run) to the Target (cRio 9024 with 6 modules) and it failed. It wouldn't even try to communicate with the target. I get the 'connection refused' error.  
    I created a new Veristand project
    I added the Scan Engine and EtherCat custom device.
    I changed the IP address and auto-detected my modules
    i noticed tat Veristand didn't find one of my modules that was there earlier. (this week)
     So, i went to NiMax to make sure software was installed and even reinstalled Scan Engine and Veristand just to make sure.
    Now, it finds the module, but when i go to deploy it getsto the last step of deploying the code to the target, and then it fails.
    Any thoughts?
    Start Date: 4/10/2015 11:48 AM
    • Loading System Definition file: C:\Users\Public\Documents\National Instruments\NI VeriStand 2014\Projects\testChassis\testChassis.nivssdf
    • Initializing TCP subsystem...
    • Starting TCP Loops...
    • Connection established with target Controller.
    • Preparing to synchronize with targets...
    • Querying the active System Definition file from the targets...
    • Stopping TCP loops.
    Waiting for TCP loops to shut down...
    • TCP loops shut down successfully.
    • Unloading System Definition file...
    • Connection with target Controller has been lost.
    • Start Date: 4/10/2015 11:48 AM
    • Loading System Definition file: C:\Users\Public\Documents\National Instruments\NI VeriStand 2014\Projects\testChassis\testChassis.nivssdf
    • Preparing to deploy the System Definition to the targets...
    • Compiling the System Definition file...
    • Initializing TCP subsystem...
    • Starting TCP Loops...
    • Connection established with target Controller.
    • Sending reset command to all targets...
    • Preparing to deploy files to the targets...
    • Starting download for target Controller...
    • Opening FTP session to IP 10.12.0.48...
    • Processing Action on Deploy VIs...
    • Setting target scan rate to 10000 (uSec)... Done.
    • Gathering target dependency files...
    • Downloading testChassis.nivssdf [92 kB] (file 1 of 4)
    • Downloading testChassis_Controller.nivsdat [204 kB] (file 2 of 4)
    • Downloading CalibrationData.nivscal [0 kB] (file 3 of 4)
    • Downloading testChassis_Controller.nivsparam [0 kB] (file 4 of 4)
    • Closing FTP session...
    • Files successfully deployed to the targets.
    • Starting deployment group 1...
    The VeriStand Gateway encountered an error while deploying the System Definition file.
    Details:
    Error -66212 occurred at Project Window.lvlibroject Window.vi >> Project Window.lvlib:Command Loop.vi >> NI_VS Workspace ExecutionAPI.lvlib:NI VeriStand - Connect to System.vi
    Possible reason(s):
    LabVIEW: The data type of the reference does not match the data type of the variable.
    =========================
    NI VeriStand: NI VeriStand Engine.lvlib:VeriStand Engine Wrapper (RT).vi >> NI VeriStand Engine.lvlib:VeriStand Engine.vi >> NI VeriStand Engine.lvlib:VeriStand Engine State Machine.vi >> NI VeriStand Engine.lvlib:Initialize Inline Custom Devices.vi >> Custom Devices Storage.lvlib:Initialize Device (HW Interface).vi
    • Sending reset command to all targets...
    • Stopping TCP loops.
    Waiting for TCP loops to shut down...
    • TCP loops shut down successfully.
    • Unloading System Definition file...
    • Connection with target Controller has been lost.

    Can you deploy if you only have the two 9401 modules in the chassis (no other modules) and in the sysdef?  I meant to ask if you could attach your system definition file to the forum post so we can see it as well (sorry for the confusion).  
    Are you using any of the specialty configurations for the 9401 modules? (ex: counter, PWM, quadrature, etc)
    You will probably want to post this on the support page for the Scan Engine/EtherCAT Custom Device: https://decibel.ni.com/content/thread/8671  
    Custom devices aren't officially supported by NI, so technical questions and issues are handled on the above page.
    Kevin W.
    Applications Engineer
    National Instruments

  • Can we change the data type of a field based on the value of the field

    HI Gurus,
    My Requirement is as below -- Could you please guide me
    in the Printable Adobe form -- for ex - as usual for dates fields in the Object Pallette the object type is a date/time field  and for quantity/currency fields corresponding fields are taken
    now in case the either the date, quantity or currency is initial in place of displaying 0.00 or empty date we need to display N/A (Not Applicable)
    for this I would like to change the data type of the field
    to put it simply --
    we need to change the data type of date field from DATE&TIME to Char type to hold N/A or  Quantity field to Char field to hold N/A
    how can we realize this in SAP adobe forms
    Thanks in Advace
    Ramchander Rao.K

    Hello Ramchander,
         You cannot change the data type of the field at run time in Adobe forms because the type of field you choose at the time of design level is associated with the data type itself.
    If you want to achieve your requirement, then your main idea should be to set the data type as CHARACTER itself while designing the field in the adobe form itself. CHAR field will comfortably hold the value of Calculation/amount field, Currency field, Amount, Date, Time HHMMSS, Unit Accuracy, Currency key, Floating point number, Numeric text, Client, Language and many other data types.
    After designing the field as TEXT field in Adobe form you have two options.
    Option 1:
    Select the Date field initially as type TEXT field or CHAR field in Adobe forms.
    Suppose the name of the field is TEXTFIELD1, then write the Javascript code on this field in Initialize event as below.
    if ( this.rawvalue == null )
         this.rawvalue = "N/A";
    If the field is not blank, then it will show the date. Else it will show "N/A".
    Option 2:
    Select the Date field initially as type TEXT field or CHAR field in Adobe forms. Do the formatting part in ABAP itself. It will increase the performance. Avoid Javascript as much as possible.
    Suppose you have a DATE variable l_dats of type DATS. Then take another variable l_date of type CHAR. Then write the below ABAP code.
    MOVE l_dats TO l_date.
    IF l_date IS INITIAL.
         l_date = 'N/A'.
    ENDIF.
    Bind the l_date to the TEXT field in the form.
    Even in this case, if the field is not blank, then it will show the date. Else it will show "N/A".
    But I will suggest you to use Option 2 of keeping the AMOUNT, QUANTITY, DATE, TIME fields etc as CHAR or TEXT fields in Adobe form and do the required formatting in ABAP itself.

  • In the attached VI why does one loop coerce the data type while the other doesn't?

    In the attached VI why does one loop coerce  the data type while the other doesn't?
    Solved!
    Go to Solution.
    Attachments:
    AAA.vi ‏8 KB

    I'm guessing you created the Enum on the front panel.  If you right-click it and create an indicator, it will match the type, and be an enum.  LabVIEW represents enums as U16, but because the types aren't identical (for example, your enum has 3 values, but a U16 has 65,536 values), LabVIEW automatically coerces (or converts) the smaller (enum) representation into the larger (U16) value.

  • The data type of the variant is not compatible with the data type wired to the type input.

    Hello all..
    Iam curently struggling with the following:
    On my main(top)_VI, I have a mix-signal graph which will output several or one signals depending on the user. I also have an inner subvi which has the analisys i want to give the the data before outputing it to the main(top) VI, which has the mix-signal graph control.
    Now, I created a reference from the mix-signal graph and Iam imputing this reference into the subVI (which inside has a property node type_control_mix-signal graph in which Iam connecting the refnum from the top VI to view the output data). The data consists of an array of clusters of 2 arrays of doubles each.
    -- let say I create the property node type control mix-signal graph and i choose value property; it lets me put the array of clusters of 2 arrays of doubles each without problems; Now the second I connect the refnum pointing to the mix-signal graph on the Main_VI it brakes the cables and only accepts one cluster of two arrays os doubles instead.
    --if on the other hand I connect the refnum to the property node type_control_mix-signal graph before connecting the imput it doesnt complain until I run the VI where it gives the error 91.
    I have also notices a (strict) parenthisis at the end of the property node sometimes. [what does this (strict) means?]
    FInally if instead of creating the refnum from the Main_VI, I create either a xy graph or a mix-signal praph it lets me connect the an array of clusters of 2 arrays of doubles each without any problem. The refnum connection seems to be the problematic factor, but  by the same tolken I dont know any other means of sending that data from the inner to the outter VI.
    I have the feeling Iam missing on one or more Labview fundamentals regarding refnums.
    Any help will be apreciated

    You almost found it on your own. The refnum needs to be 'strict', that means that the data type of the graph is set (2D dbl), otherwise it will use the default data type. To do this you create the refnum directly from the graph after you have wired the correct data type to the terminal. In this case the refnum wire will break if you change the data type of the graph.
    Independend of this issue, I suggest you not to use the value property on the graph but directly wire the data (e.g. the 2D double) to the SubVI. The property value is by far the slowest way to get data, and 2D arrays are really some amount of data.
    Felix
    www.aescusoft.de
    My latest community nugget on producer/consumer design
    My current blog: A journey through uml

  • As to the data type of the data type of the difference between two date type of datas

    Hi,
    I have a question about the data type of the difference between two date type of datas.
    There are two date type of datas as:
    SSHIPMENTS.RECEIVEDATETIME
    SSHIPMENTS.PROMISEDATETIME
    I try to use the following SQL Script in Oracle SQL*Plus as:
    SELECT CASE
    WHEN (SSHIPMENTS.RECEIVEDATETIME - SSHIPMENTS.PROMISEDATETIME) < '000 01:00:00.000' THEN 'OnTime'
    WHEN (SSHIPMENTS.RECEIVEDATETIME - SSHIPMENTS.PROMISEDATETIME) < '000 01:30:00.000' THEN '60-89 Minutes'
    ELSE '3+ Hours'
    END
    FROM SSHIPMENTS;
    The error message of "Invalid Number" for the '000 01:30:00.000' happens.
    I don't know if the data type of the interval is wrong.
    Many Thanks,
    Cathy

    SELECT CASE
    WHEN (to_char(SSHIPMENTS.RECEIVEDATETIME,'hhmiss') - to_char(SSHIPMENTS.PROMISEDATETIME,'hh24miss')) < '010000' THEN 'OnTime'
    WHEN (to_char(SSHIPMENTS.RECEIVEDATETIME,'hhmiss') - to_char(SSHIPMENTS.PROMISEDATETIME,'hh24miss'))< '000 01:30:00.000' THEN '60-89 Minutes'
    ELSE '3+ Hours'
    END
    FROM SSHIPMENTS;
    just try it out..

  • Query regarding the data type for fetcing records from multiple ODS tables

    hey guys;
    i have a query regarding the data type for fetcing records from multiple ODS tables.
    if i have 2 table with a same column name then in the datatype under parent row node i cant add 2 nodes with the same name.
    can any one help with some suggestion.

    Hi Mudit,
    One option would be to go as mentioned by Padamja , prefxing the table name to the column name or another would be to use the AS keyoword in your SQL statement.
    AS is used to rename the column name when data is being selected from your DB.
    So, the query  Select ename as empname from emptable will return the data with column name as empname.
    Regards,
    Bhavesh

  • Determining the data type of the list item

    Hi experts,
    i have a dpop down list item in my form and from it i want
    to select some of the columns of emp table like mobile_number or address
    and send the selected field,along with name and empno to reports.
    But when i am trying to determine the data type of the selected
    item i am faceing some difficulties.
    i am trying this
    param := emp.:emp.LIST10%type;
    can you please help me.
    Regards
    rajat

    param := emp.:emp.LIST10%type;I'm not quit sure what you are trying to achieve with this.
    If have build a poplist as a block-item you know the datatype of that item. When you know want to create a local variable to take the value from that list, either define it just with the datatype taken from the item, or take it dynamically from the column from the database the item is based on, so
    DECLARE
      -- explicit
      vcParam  VARCHAR2(50);
      -- takeing datatype from db-column
      vcParam  TABLENAME.COLUMNNAME%TYPE;
    BEGIN
      -- Assignment
      vcParam:=:EMP.LIST10;
    END;

  • How to get the Data type of the Internal Table.

    How can i get the data types used to create an internal table
    TYPES : BEGIN OF t_makt,
              matnr    TYPE    matnr,
              maktx    TYPE    maktx,
            END OF t_makt.
    Like this some function will give me which data types i have used for the internal table at run time.

    Use the FM ..
    data : int_fcat type SLIS_T_FIELDCAT_ALV.
    REUSE_ALV_FIELDCATALOG_MERGE ..
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                I_PROGRAM_NAME         = sy-repid
                I_INTERNAL_TABNAME     = 'IMAT'   <-- this is your internal table
                 I_INCLNAME             = sy-repid
           CHANGING
                CT_FIELDCAT            = int_fcat <--- this contains all the fields along with their characteristics ...
           EXCEPTIONS
                INCONSISTENT_INTERFACE = 1
                PROGRAM_ERROR          = 2
                OTHERS                 = 3.

  • How to create the Data Type for the receiver end?

    Hello Expertise
    I wanted to Create a Data type for  Receiver end in PI.
    Sender end is ECC.
    Receiver end is SRM
    Here's the Data type for Sender end  as
    Can anyone help to create the Data type for Receiver end i.e SRM.
    Thanks in advance.
    Regards
    karan

    Hi Karan,
    Please don't call Sir, we are just trying to help each other.
    Please go through below scenario's and check your configuration.
    ABAP Client Proxy to ABAP Server Proxy Scenario - Process Integration - SCN Wiki
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0ac1a33-debf-2c10-45bf-fb19f6e15649?overridelayout=true
    http://wiki.scn.sap.com/wiki/display/XI/Step-by-step+FTP+to+ABAP+Proxy
    regards,
    Harish

  • Activation error while changing the data type of a field of a table

    hi friends,
    i am facing one problem while changing a data type of a field of a table.
    i just created one table(Yqm32) .i have assigned charcter data type to one field(ztotal_count) .now i want to change this charcter data type to numeric data type.
      while changing to NUMC data type activation error is comming as below.
    Table is not yet classified                           
    Field ZTOTAL_COUNT: Type change                       
      ALTER TABLE is not possible                         
    Structure change at field level (convert table YQM32) 
    Check on table YQM32 resulted in errors   
    Table YQM32 could not be activated                       
    (E- Structure change at field level (convert table YQM32)
    plz suggest.i need to change the data type from char to numc.
    Thanks & Regards

    Hi Pabitra......
    From the SE11 change the table as u wanted and then from menubar select
    UTILITIES--> DATABASE UTILITY
    It will open database utility
    there u select the Activate and adjust database button.
    then the database table will get adjusted.
    just try it once.........
    Suresh......

Maybe you are looking for

  • OIM 9.1.0 Integration with Active Directory 2008 R2

    Hi, My customer is running Root/Child AD structure based on windows 2003 w/SP2, OIM 9.1.0 deployed under one of the child domains, and integrated with child domains controllers which runs windows server 2003 as well. My customer has decided to upgrad

  • HT1692 Can I sync my iPad 3 calendar to my husband's IPod touch 4th

    I just got a iPad 3 for Christmas and got my husband a iPod touch 4. I want to sync my calendar to his iPod he has a separate account. Is it possible?

  • Can I have an external video source run in a window instead of using the full display?

    I'm aware that the 27" iMac models are capable of accepting external video sources, but I'm wondering if it's possible to have an external video source run in a window on the desktop, rather then use the full display. Does anyone know if there's any

  • Mac OS 10.9 WiFi Issue: Safe boot needed

    I started seeing a problem connecting to Wifi AP soon after the upgrade to 10.9.  (A similar thread exists on the discussion groups but not quite the same) Essentially the problem I see after having upgraded to OSX 10.9.4 is "Connecting to a new wifi

  • Sound Recorded Too Low

    Hoping someone can help! On my recent shoot, the recording volume settings were too low (I think) and after capturing to FCP the average reading is around -50 and peaking at -12. Even upping the sound bar by the max 12dB isn't enough really to repair