Length vs vsize?use of vsize in practical scenario?

what is the actual difference between length and vsize function.?
on what condition vsize function should be used ?
how does vsize calculates for date and number datatype?
i came across these things
can you please tell me why this type of result is coming.
SQL> select vsize(1234567890123) from dual;
VSIZE(1234567890123)
8
SQL> select vsize(12345678901234) from dual;
VSIZE(12345678901234)
8
SQL> select vsize(sysdate) from dual;
VSIZE(SYSDATE)
7
why the size of sysdate is 7.....and the size of these
two different number with different length is same.
thanks

Look at the DUMP function to see how a value is stored internally, for example:
SQL> create table test_sizes (num number, dt date, str varchar2(20));
Table created.
SQL> insert into test_sizes values (1, sysdate, 'One');
1 row created.
SQL> insert into test_sizes values (100, DATE '2008-01-01', 'One hundred');
1 row created.
SQL> col dump(num) format a30
SQL> col dump(dt) format a40
SQL> col dump(str) format a60
SQL> SELECT num, vsize(num), dump(num) from test_sizes;
       NUM VSIZE(NUM) DUMP(NUM)
         1          2 Typ=2 Len=2: 193,2
       100          2 Typ=2 Len=2: 194,2
2 rows selected.
SQL> SELECT dt, vsize(dt), dump(dt) from test_sizes;
DT         VSIZE(DT) DUMP(DT)
08-MAY-08          7 Typ=12 Len=7: 120,108,5,8,8,38,28
01-JAN-08          7 Typ=12 Len=7: 120,108,1,1,1,1,1
2 rows selected.
SQL> SELECT str, vsize(str), dump(str) from test_sizes;
STR                  VSIZE(STR) DUMP(STR)
One                           3 Typ=1 Len=3: 79,110,101
One hundred                  11 Typ=1 Len=11: 79,110,101,32,104,117,110,100,114,101,100
2 rows selected.I was a little puzzled by vsize(sysdate) being 7 as well. I suppose it must be converting it from an inline date (type 13, 8 bytes) into the stored-date format (type 12, 7 bytes).
Message was edited by:
William Robertson

Similar Messages

  • How do I use Garage Band to practice my guitar against lesson CDs and backing track CDs

    How do I use Garage Band to practice my guitar against lesson CDs and backing track CDs

    GarageBand on your Mac or on an iPad?
    If you are asking abot GB on a Mac you do the following:
    Create a new GarageBand project with a Guitar track
    Insert the CD and drag the audio file of the Lesson track or backing track to an empty region below the tracks in the timeline of the GarageBand window.
    Plug in a set of head phones and put them on to listen to your backing track.
    Plug in your guitar and select the guitar track.
    Click on the measure where you want to start your recording and select the guitar track.
    Press "record" and start to play.
    Regards
    Léonie

  • Creation of a product description field of length 250 car. used for search?

    Hi all,
    we need to create a specific description field for products  with a length of 250 (the standard description is too short at 40 car, =>table COMM_SHTXT) . That field should also be added to the search criteria.
    What would be the best solution for this creation , given that the field must exist also in ECC SD from where the product is replicated to CRM :
    -creation of a Z-append to the product table in ECC (table MARA?) and a corresponding include in the product table in CRM (COMM_PRODUCT) ?
    -creation of an attribute in ECC (or Z-append) and creation of a "set attribute" in CRM (i.e transaction COMM_ATTRSET), but there are warning in CRM when you create an attribute of length > 132.
    -using the standard Texts (no limitation of lenght) attached to products : is a search possible on these texts?or too complicated/poor performance ?
    Regarding the display in CRM UI, is it possible to display all the 250 caracters  if the field is a customized "set attribute" or a Z-append? It seems that it is not possible to display a string field on more than one line in the UI configuration, or even, on more than 8 columns in an assignment block?
    thanks for your help
    Ludovic

    well, I have found at least how to replace the error message (length of max 75 car  for PC UI) . Instead of trying to edit manually table T100C, there is an entry in customizing SPRO (cross appl/SAP Product/basic settings/Define Characteristics of System Messages
    ) which allows to customize standard messages , and so change from Error to Warning.

  • Do we use Accrual Orders in practical world

    Hi Experts,
    I want to get some information about practical use of Internal Order scenario Accrual Order. In real industries or real businesses those who are running SAP... do they use this functionality. If yes then what are the scenarios. I know some which are on web like wages or insurance but i just want to get some practical scenarios which are in use.
    Comments from your practical exposure would be greatly appreciated.
    Regards
    Naseem

    hi
    yes, there are few clients who are using these accrual orders.
    I have used previously for distributing the insurance and annual plant maintenance cost which will be incurred at a particular period of time but need to be allocated through out the fiscal year, which is the ideal requirement of managerial accounting
    krishna

  • Table  for field ZYKL1(Cycle length) & ZEIEH(Unit) used in Maintenance stra

    Hi
    Can anyone please inform in which table  the field ZYKL1(Cycle length) & ZEIEH(Unit) used in Maintenance strategy get stored? I need to pass Maintennace plan no (WARPL) & Maintenance call no(ABNUM) to get this field ZYKL1(Cycle length).
    Thanks in advance.
    rgds
    mehbub

    Hi Rajib,
    Please check the Table MHIS. It has WARPL, ABNUM & Cycle package (ZYKZT), the package from Strategy. It seems that there is screen conversion kind sort of it for the field. Just get it checked by an ABAPer.
    Regards,
    MLN Prasad

  • Need some practical Scenarios to test Compliance Calibrator, FF and AE

    Hi Experts,
    I have installed Compliance Calibrator 5.2 / Access Enforcer and Firefighter on a test System. However i am looking for some practical scenarios / Examples to test the functionlity of these installations. If any of you is currently working on these technologies i appreciate if you c an provide 2 3 scenarios to test my installation and functionality .
    Thanks in advance.
    Your help is much apprecaited..
    SK

    Hi SK,
    Testing the functionality of CC
    1. I would recommend to create some test roles where in you plug in some conflicting tcodes
        which can pose a sure SoD Risk, lets say Create Vendor Invoice(FB01) and Make an
        Automatic Payment(F110).
    2. Now run the Risk Analysis by choosing the Default SAP GRC ruleset library and do a  
        Role level Analysis.Then Assign the Test Roles to Test Users and then do a User Level Analysis.
    3. You may have create some Custom Rule sets with appropriate naming of Conflicting functions
        like Creation of Purchase Order (P001), Approve Purchase Order(P002)
        in different Application Areas like Purchase 2 Pay(P2P), Order 2 Cash (O2D) and try to do
        the same as above two steps.
    4. Test the functionality of Risk Remediation by removing the conflicting tcodes and do the
        Risk Analysis.Your previous Risk Roles must not appear
    5. Test the functionality of Risk Mitigation by placing a mitigation Control on the Conflicting tcodes
       and do the Risk Analysis.Your previous Risk Roles must not appear if you have properly
        configured your CC
    Testing the functionality of FF
    1. I would say create a few Firefighter IDs in different functional areas like FI, SD, MM, and then
       create some test users for Firefighter Owners, Controllers and Firefighters who can use
       the functionality of FF.
    2. Create some FF roles which have exceptional access in those functional areas
        encompassing transaction codes and authorization objects that are not used in normal incidents.
    3. Assign each of the FF roles to the respective FF IDs and then to the test Firefighters.
    4. Pull the log reports in FF and see if it gives exact details of the FF usage.
    5. You may have take some assistance of the Functional team members to do the testing.
    Testing the functionality of AE
    1. Create a workflow scenario of hiring a new user.
    2. Create the request under a test requestor. Assign the request to some test approver
    3. Also Assign some roles and test the functionality.
    Hope this helps for a good start
    Regards,
    Kiran Kandepalli.

  • Practical scenario.

    hello,
    Can anyone help me with giving a hint regarding practical scenario reports.
    so that i can practise.
    Thanks a lot in advance.
    arpitha
    [email protected]

    Hi Arpita
    Welcome to SDN!
    I am giving you the Link from help.sap.com on BI content .
    http://help.sap.com/saphelp_nw04/helpdata/en/29/79eb3cad744026e10000000a11405a/frameset.htm
    This is for Supply chain Management and there are lot of practical reports (BI content Queries )
    Install these Queries and ODS/Info cubes involved in the design . Load the data and execute these reports.
    Happy Learning .
    hope this helps
    Regards
    Pradip
    (friends: don't forget to assign points to helpful answers )

  • JDBC(using stored procedure) to RFC Scenario

    Hi
    I am doing JDBC(using stored procedure) to RFC Scenario
    While running the scenario i am getting the following error
    Database-level error reported by JDBC driver while executing statement 'EXECUTE EMU.EXTRACTRECON'. The JDBC driver returned the following error message: 'com.ibm.db2.jcc.a.SqlException: [ibm][db2][jcc][10100][10910] java.sql.Statement.executeQuery() was called but no result set was returned. Use java.sql.Statement.executeUpdate() for non-queries.'. For details, contact your database server vendor.
    Can anybody sortout my problem
    Regards
    sunilreddy

    Hi,
    i am doing the scenario file to rfc scenario.
    when i run my scenario xi system is picking the data from file system
    but rfc is not accepting the data.this is the error i am getting
    Delivery of the message to the application using connection RFC_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Exception thrown in method process. The transaction is marked for rollback.: com.sap.engine.services.ejb.exceptions.BaseTransactionRolledbackLocalException: Exception thrown in method process. The transaction is marked for rollback..
    so please any one give me the solution for that

  • Fixed segments length in File using IDOCXmlToFlatConvertor module

    Hi,
    We need to create fixed length segments with 1063 characters each in flat file generated by the IDOCXmlToFlatConvertor module.
    At presents the length of the segments is variable. I believe the module refers the IDO file in R3 system and generate segment lengths accordingly.
    It there any approch by which we can create fixed length segments in the generated file.
    Regards
    Pravesh

    Hi Pravesh,
                         could you please kindly provide a sample input and output.
    If I have understood your requirements properly, we can achieve this in mapping itself,separate IDOCXmlToFlatConvertor module may not be required. In mapping we can count 1063 characters in each idoc segment and put it in target message. Then use receiver File content conversion to achieve this. Preferably java mapping will definately meet all requirements.
    In case you need further clarification please let me know your source and target output.
    regards
    Anupam

  • How to add field length constraints when using an existing JavaBean model

    Within our current project we used a O/R mapping tool to generate our JavaBean model. For e.g.
    <b>public class Person{
      private String name; ...getName() ...setName(...)
    }</b>
    The whole model is used within our Web Dynpro project. Now it's a requirement to implement field length constraints. Normally this is no problem using ISimpleType like the following:
    <b>attributeInfo = wdContext.nodePerson().getNodeInfo().getAttribute
    (IPrivate...IPersonElement.NAME);
    ISimpleTypeModifiable type = attributeInfo.getModifiableSimpleType();
    type.setLength(60);</b>
    But we've got an runtime exception that it is not allowed to modify the models datatype:
    com.sap.tc.webdynpro.progmodel.context.ContextException: AttributeInfo
    <b>(Basics.Person.name): must not modify the datatype of a mapped attribute</b>
        at
    com.sap.tc.webdynpro.progmodel.context.AttributeInfo.getModifiableSimpleType
    (AttributeInfo.java:337)
    The question is how could a workaround look like. Or is there nothing like that and we have to build a dictionary type tier upon our JavaBean model. Any ideas ?
    thx,
    s.w.

    Sabine,
    You may:
    1. Import JavaBeans model
    2. Create DDIC type with necessary constarints (string-based, max. length 60)
    3. Open editor for target model class and change type of property.
    See my blog /people/valery.silaev/blog/2005/06/29/apojo--almostplain-old-java-objects-as-model (section "Tweaking model classes") for details.
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

  • How can we restrict Column length in ALV using POWL.

    Hello,
    I have a new assignment o ABAP Web Dynpro, data displaying ALV by using POWL is a part of that assignment. Everything went fine and at last moment I was stuck with a small issue. In my application I am displaying first ALV by using POWL concept and on the basis of selected row I am displaying second level LAV by using normal ALV procedure (SALV_WD_TABLE). Here the issue is as soon as second ALV is displaying columns in first level ALV are getting expanded. How can I restrict Column length in first level ALV using POWL. I browsed a lot for getting the solution for this, Can any one help me out from this issue.
    Regards,
    Kumar

    Done, in field catalog method...

  • I'm trying to draw a class schedule using JTable, is this practical?

    I'm developing a system that has to draw a schedule on screen. The very first question I ask myself is whether this is practical or not, but I can't think of any components else.
    The thing is I don't know that:
    1. If I use the header to indicate the time (e.g. 9:00-10:30; 10:30-12:00; 12:00-13:30; 15:00-16:30), can I have another vertical "header" to indicate the day of the week?
    2. Many times an event in the schedule finishes before the time slot does, e.g. a Java Programming class could be from 9:00 - 11:30 on Monday, which means if I just add it on the first two time slots on Monday, it's supposed to mean that's from 9:00 - 12:00.
    3. If I modify the time slot to be shorter, e.g. 9:00-9:30; 9:30-10:00; 10:00-10:30; 10:30-11:00 ... 16:00-16:30, the table will look too funny to put into real use.
    4. If this were in Microsoft Excel, I would use three cells with each cell representing a period of 30 minutes, and the merged column header, is it possible to do the same thing with Java?
    Thank you very much in advance for any replies!

    In the future, Swing related questions should be posted in the Swing forum.
    Maybe one of the example here will give you some ideas:
    http://www.crionics.com/products/opensource/faq/swing_ex/JTableExamples1.html
    can I have another vertical "header"Its called a row header and you add a component to the scroll pane to represent your days of the week. This is done by using the setRowHeaderView(...) method. Search the Swing forum for examples using this method (I've posted several).

  • How can i use a database for practice in DOS

    i have some problems in the sqlplus.
    My OS is windows2000 server,when i intalled the Oracle 8i
    i type a command 'cmd' go to DOS.and type "sqlplus username/password@database"
    but always the system say that my database name can't be deal with.
    and i want to get a sample database for training SQL statements.How can i get it.
    is Oracle 8i have the sample database.

    It sounds like your database hasn't been started yet so do this:
    Try typing svrmgrl at the c:> -- if it doesn't work you might either have to go to the proper directory or type sqlplus to get an sql:> prompt (I don't remember it's been a while) but the rest I am pretty sure about---
    When you get the svrmgr prompt:
    use (i think) "connect internal"
    and "oracle or Oracle" as password
    once you do this
    it should say connected
    then use: svrmgr:>shutdown -- shutsdown DB
    then use: svrmgr:>startup -- starts DB
    hopefully then you can access your database through SQL Plus

  • When to use Resource Plans - best practice?

    when would a Resource plan best be used instead of simply building a team within a project file with generic resources?  
    thanks
    Steve

    Hi Steve,
    The resource plan is meant to be used in an early planning phase before starting scheduling the project phases. The resource plan allows you entering the workload planned by resource skills by time period. It could also be by named resources if they are
    already identified in this early phase (but usually they are not). The resource plan is really useful when you start using Project from the business case before the project even really started. Doing so, you'll be able to perform portfolio analysis and scenario
    and manage your pipeline of projects based on the capacity available.
    Then as soon as you are able to create a more detailed plan, you switch to MS Project were you can assign resources (generic and/or named) to phases/tasks. Note that you have a parameter in the resource plan which trigger how the capacity is calculated:
    from the resource plan: in the early phase when you just have a resource plan,
    from the project plan: when all your workload is transcrribed in the project plan and the resource plan is either empty or redundant,
    from the project plan until : when the project plan contains the workload until a certain date; after this date, the resource are not yet identified and Project takes the workload from the resource plan to calculate the capacity.
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |

  • Keywording and use of capitals - good practice?

    Before coming to Aperture, I was used to keywording without capitals except for names. I see Aperture's default keywords all come with capitals.
    Looking to the future when metadata starts being read by search engines etc could case sensitivity (if implemented) impact on searches? For examples searches for Mountains not showing mountains.
    I feel the safer option is to not capitalise except for names of places, people,etc.
    What are other people's thoughts on this?
    Ross

    Almost all searches are case insensitive. So it shouldn't affect results.
    That said, I prefer not to capitalize every word. Only proper nouns for the most part.
    I've started to use Controlled Vocabulary (www.controlledvocabulary.com) to help with my keywording and they're not capitalizing so there you go. iStock Photo capitalizes most keywords when I upload, though.

Maybe you are looking for