Declaring field size dinamicaly

Hi experts,
I need to declare a Dynmic Variable. For exemple :
Data: begin of it_Test
         var1(10) type c,
         var2(val) type c
end of it_test.
In the example above, I have one internal table (test) with too fields and the size of the Field var2 must to be dynamic. Ho can I do it, please.
tks, friends

Hi,
Try declaring it as string.
Data: begin of it_Test
var1(10) type c,
var2  type  STRING,  "change here
end of it_test.
Thanks
Naren

Similar Messages

  • Table field sizes

    Hi,
    Our application has been developed for single user mode only. Now it is being changed to work in multi user mode with oracle9.2.0.1.0.
    Some of the fileds in the GUI are text fields and text areas where the client can enter any amount of data.
    How shuold I declare the sizes of those fields in my table creation scripts.
    I am novice to this.
    Thanks in advance.
    Regards
    Jagannadham

    hi there
    what is the gui used and hope there will some limit on the text size whatever he enters how you used to store it in a single user env? file is it ?
    if the text is within 4000 then you can go for varchar2

  • How to determine the field size

    I am going to make a multiplatform application that hopefully
    will run on linux and windows 2000.If the os is 2000, then I will use
    vb.net/aspx else I'll use java servlets. I make the connection
    to the web server ( through HTTP) not directly to database server.
    So, the resultset will be stored in the String object. The columns
    will be separated by delimeter. Our problem is how to determine
    the size and type of the fields of mssql,oracle and postgres database
    so that we can include it in the String object.
    Ex.
    String sResultSet=new String();
    ResultSet rs=statement.executeQuery(sSQL);
    while(rs.next()){
    sResultset=sResultSet + rs.getString(field1) + "||" + rs.getString(field2) + "||";
    vertical bars acts as delimeter
    supposedly this is the code:
    sResultset=sResultSet + rs.getString(field1) +"_" + rs.getFieldType() + "_"+
    rs.getFieldSize() + "||" + rs.getString(field2) +"_" + rs.getFieldType() + "_"+
    rs.getFieldSize() + "||";
    supposedly this is the code if rs.getFieldType() and rs.getFieldSize() methods are existing
    Anyone can give me an idea how to get the field type and field size of the database?
    thanks in advance

    Yes, but I dont know how to do it.
    Can you give me an example of using it.
    Thanks in advance

  • How to change the field size cache/buffer in a query

    I query a field from sql developer, the field is cases_history, it resides in a data mart in the global network of our company.
    this field is big in size, it stores logs in a sequential way, so field size increases a lot.
    when i query it and try a "single record view" the field is cut off and can´t see all of its content..
    WHAT I THOUGHT AND IT DOESN´T APPLY
    1. maybe in database connections in the system tab, I go to the oracle data mart that i am interested in and change buffer and cache
    but it doesn´t work, sql developer keeps showing part of the field
    2. maybe it was then the buffer size in sql developer, so I change it, but no luck
    WHAT IS THE PROBLEM HERE?
    MANY THANKS IN ADVANCE

    many thanks in advance for your help,
    1.the data type in the remote oracle data mart is VARCHAR2(4000)
    2.editing with the pencil cuts off at somepoint (which is the same line and last word)
    3.this is the query I write
    ||select case_history from wfm_case where case_id='xxxx'||
    this is to test if I can get a long case_history, which we know it is because it is fully accessible through a web solution to revise cases.
    PLS note. I have a tns connection which is of the following type :
    (in data sources (odbc) -- system dsn -- oracle odbc driver configuration ...oracle .. buffer size =9000 , cache buffer size =4000 and FORCE SQL_WCHAR SUPPORT is enabled
    many thanks,
    Jordi.

  • What is the best way to declare field length 500 in internal table?

    Hi all,
    what is the best way to declare field length 500(constant value allways) in internal table?
    I am trying to send data from internal table to file format, and I have a field in internal table with 500 length (constant value always). So how do I can declare and append this field value to table?
    Thanks
    Murali

    Hi.  Please see the following example program, notice how I am filling the field with the constant value.
    report zrich_0001.
    *       CLASS lcl_main DEFINITION
    class lcl_main definition.
      public section.
        types: begin of ttab,
                fld1(500) type c,
               end of ttab.
        data: itab type table of ttab.
        data: xtab type ttab.
        methods: constructor,
                 write_itab.
    endclass.
    *       CLASS lcl_main IMPLEMENTATION
    class lcl_main implementation.
      method constructor.
    <b>
        xtab-fld1 =
          'This is one part of the total string which needs to be really' &
          ' long and this is a constant and we need to move it to a work' &
             ' area and then append it to the internal table which has a' &
              ' field with a length of five hundred characters'.
        append xtab to itab.</b>
      endmethod.
      method write_itab.
        loop at itab into xtab.
          write:/ xtab-fld1.
        endloop.
      endmethod.
    endclass.
    data: o_main type ref to lcl_main.
    start-of-selection.
      create object o_main.
      call method o_main->write_itab.
    Regards,
    Rich Heilman

  • How to increase the field size in modules

    Dear Oracle Team,
    When we add some items in reason codes from the dictionary, it has certain limit in reason code and title. So I can increase those field size to add bigger text for title names.
    I think it also applicable for the fields in other modules also. Looking your valuable support.
    Thanks & Regards,
    Sheik

    1.  Once you add a custom field to your database, it would be made available to either your reports (BI) or your layouts in PCM.
    2.  When you create the custom field, you would specify the field length/type/properties.  (i.e. "Char" field with 120 char field length)  If you set this to one value when you create (say 120 char) and want to CHANGE it to 140 characters, you cannot do this without deleting and re-creating the custom field.  I did check 14.0.3 and this continues in this version as well.
    2a.  Best practice is to be generous in your field sizes to avoid needing to change it later.
    As I mentioned before, any default fields in the database are fixed to their set properties and the only way to change them is to submit an SR to Oracle to request the change.

  • Increasing field size in content repository

    What is the best way to increase the field size in the content repository? We are using MS SQL Server and I can't find a way to adjust field width in the Weblogic Administration interface for creating a new repository. Should this be done in the underlying SQL Server? It seems to me that even if we did that, there is a seperate setting in the repository limiting field width, but I don't know how to access that value.
    Thanks Much,
    Tim

    The NoSquint seems to work. The other one didn't install. I may have made a misstep.

  • How to change field size using SQL against an oracle Database

    I am an admitted novice user, looking to become more proficient.
    I have a field in a table that I need to expand the field size. The table is called Inquiries. The data type is text. The current Field Size is 10. I want to increase it, to either the max, or somethign long enough to fit TECHNOLOGY LEADERSHIP PROGRAM.
    What is the SQL command to change the field size, and what is the max for a Text Field Size

    And/Or, an even better question might be,
    Do I need to use SQL*PLUS to do this, or are there better tools. I.e, I like how in Access, you can open up a database in Design view and just change the amount for the field size. Is there a similar "easy" method to do something like that with an Oracle database.
    My current version of the server/database is:
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
    With the Partitioning option
    JServer Release 9.2.0.6.0 - Production
    I was thinking I had to do SQL commands to perform the action, but there may be another way that I am not thinking about with all of the tools at my disposal. When I installed Oracle on my desktop, I installed most of the management tools and networking services, if that helps

  • Item Code Field size

    Hi!
    Is there a way to increase the Item Code field size? I believe it is 20 characters. Can it be increased to a higher size, say, 35 characters?
    Prajwal

    Hi Prajwal Kashyap,
    The length of item code is designed in background as 20 characters and cannot be changed from front end, even with add-on/SDK.
    If it is really necessary for your customer to change the definition, please kindly refer to Note 1028874 regarding missing functionality for datails and log a message providing Business Impact.
    Regards,
    Varun
    SAP Business One Forum Team

  • Changing LOV's  table-field size

    Hi,
    I'm using Jdeveloper 11g.
    Knowing that the tag below is used in LOV, Now I need to know how to change the LOV's table-field sizes? (I'm using the model-based LOV, and it's reading the attributes from the view object)
    <af:inputListOfValues
    model="#{bindings. .listOfValuesModel}"/>
    I need to customize the size of LOV's table-field manually, or based on the attribute's UI hint.
    To do so, I have written the code below in the backing-bean:
    RichInputListOfValues lov = (RichInputListOfValues)launchPopupEvent.getComponent();
    FacesCtrlLOVBinding.ListOfValuesModelImpl lovModel = null;
    lovModel = (FacesCtrlLOVBinding.ListOfValuesModelImpl) lov.getModel();
    TableModel tm = lovModel.getTableModel();
    java.util.List<oracle.adf.view.rich.model.ColumnDescriptor> l = lovModel.getItemDescriptors();
    But the "ColumnDescriptor" is an abstract class, and I cannot customize the size of the table.
    I need to know if it's possible to do it or not?
    Thanks in advance,
    Shadi Khani
    Thank you in advance,
    Shadi Khani
    Edited by: ShadiKhani on Aug 10, 2010 6:07 AM

    Hi ,
    i Know my answer is too late , just today i see the post .
    You can change content Size for LOV by going to look up view object --> then to attribute ---> UI hint ---> form UI hint but the size of component in "Dispaly width"

  • Dynamically modify the crystal report field size based on Paper size in C#

    Hi,
    I need to modify the Crystal Report field size dynamically based on the paper size using C# .Net. According to the paper size, crytal report field width should be increase or decreae.
    Kindly suggest any solution on this.
    Thanks

    Moved to .NET SDK forum
    See these RAS samples:
    http://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples#NETRASSDKSamples-Exporting%2FPrinting
    Don

  • Change Field Size of CodeItem In OITM Table

    All,
    Could I Change Field Size of CodeItem in OITM table (Default is 20 Characters)  to 30 Characters?
    Thanks

    Hi,
    You can request changes in Business One through the Product Collaboration Forum here on the SDN, or by contacting your local SAP field office for more assistance.
    SAP note 1028874 has more information about this.
    Regards,
    Niall

  • Data Source - Bad Field Size (Row Number)

    Hi,
    I get following Exception "Data Source - Bad Field Size" when I run:
    oForm_ActivityView.DataSources.DataTables.Item("mtx_C").ExecuteQuery("SELECT...
    The Select statement run fine in SQL 2005.
    I am using following SQL statement to get the row number:
    ROW_NUMBER()OVER (ORDER BY OCLG.ClgCode) AS RowNumber,
    If I remove the statement it works fine.
    How do I get the row number in B1 to my Matrix?
    Thank you,
    Rune

    I fought with this in the past too and solution for me was:
    original query
    select ROW_NUMBER() OVER (ORDER BY ItemCode) AS RowNumber, *  from oitm
    new query
    select t.* from (select ROW_NUMBER() OVER (ORDER BY ItemCode) AS RowNumber, *  from oitm) t
    or convert the rownumber to nvarchar instead of integer as
    convert(nvarchar(10),  ROW_NUMBER() OVER (ORDER BY ItemCode) ) as RowNumbver
    check it and let me know

  • Data size: -535703600 exceeded the defined field size: 4000.

    Hi experts I am trying to access BLOB column from database using direct database request. I am getting the following error.
    A general error has occurred. [nQSError: 46034] Data size: -535703600 exceeded the defined field size: 4000. (HY000)

    Any suggestion?

  • Account field Size

    Hello Forum,
    by default Account field size is only 30, what is not a lot at all.
    Is it possible to change this size? Sure one can do it in the database, won't it cause any difficulties later on?
    Regards,
    Gulnara

    If you alter the database, be sure to do it for every table... people do this all the time for content ID.
    This can cause problems if you try to migrate content from one system to another, and forget to alter the field sizes in the new system. But, with the replication exceptions component, this isn't nearly as painful as it used to be!

Maybe you are looking for