Table key fields

Hello to all the Experts,
In a report programming I am accessing a table which I don't know. I have to print the information about the table as an output, how can I know the key fields of the table?, I am already using RTTS but want to identify the key-fields of the table.

Hi,
Goto se11 transaction.Give the table name and choose display mode.
You can see all the keyfields of the table.
Reward points if useful.
Thanks and Regards,
Litta

Similar Messages

  • Table Key field Question

    Hi All,
              According to the requirement I have to make the CURR type field as the key field in one of the table. But dureing activation it's throwing the below warning :
    Key field <Field name> has num. type CURR: Buffering not possible, Transport restricted
    Message no. DT607
    Diagnosis
    A numeric type was used for a key field. A table of this sort cannot be buffered.
    When buffering, the table records for numeric values cannot be stored in plain text. Therefore, no entries are found when buffered numerical values are compared in the WHERE condition, although the table can contain entries satisfying the compare criterion.
    The contents of the table cannot be transported if you specify the full key. You can only tranport table contents specified with a character field, up to the first occurrence of a numeric key field.
    Procedure
    You can enter "no buffering" as an attribute of the technical settings and then repeat the activation process. The table is not buffered.
    If you want to buffer the table, you must replace the type in the key field by a character type, i.e. that you must modify the table.
    If you want to transport the contents of a table, you can only do so for records specified by a character key, up to the first occurrence of a numeric field.
    Is this will be a problem when we transport the entries of the table from DEV to QA ???
    If yes how we can solve this problem??
    Thanks for your help in advance.
    Thanks,
    Greetson

    you cannot transport entries with a transport request (TABU)
    but it should be no problem to fill table in another system with your own export-/import program per file-download/upload or per RFC.
    hope that helps
    Andreas

  • Table Key Field Selection

    Hi,
    I just want to ask if there is a way to get the key field/s of a specific SAP table.
    Thanks in advance!!!

    Hi ,
    Can you be more specific on your question.
    If it is Primary key of a table then in transaction SE11 type the Table name and click on display button.
    It will open a table, in that click on the Fields tab where you would be able to see Primary keys being checked under the column name 'key'.
    If it is foreign key, you can find that in the same table in the entry help/check tab under column name 'Foreign key'checked and giving the table where it exists as primary key.
    hope it helps.
    Regards,
    Vivek

  • How to increment table key field automaticly?

    Hallo Guys,
    I need to increment ID-field in DB table. Another record in table means id = id+1.
    Is there any FM how to do it dynamicly or automaticly? Or is there a special setting in
    table(data element) so I don't have to do it in my program by inserting new record?
    Thanks.

    You should use a number range with internal numbering , and FM NUMBER_GET_NEXT (NUmber range: Assigns next free number).
    Number ranges are managed by transaction SNRO.

  • GUID in table key (field name IDHEADR) is not supported

    Hi Experts,
    the above mentioned message (see subject) was displayed after I have tried to generate a
    maintanace view thorugh se11/ Utilities/ Table Maint. Generator / F6.
    What is wrong ?
    How can this problem be solved
    Regards
    sas

    ok I have followed your instructions but now I get the dump
    Syntax error in program "SAPLZPD_ZSDTAB ".
    ""OK_CODE" has already been declared."
    The include has been created and last changed by:
    Created by: "SAP "
    Last changed by: "SAP "
    Error in the ABAP Application Program
    The current ABAP program "SAPLSVIM" had to be terminated because it has
    come across a statement that unfortunately cannot be executed.
    regards
    sas

  • Creation of key field in a database table

    Hi All,
    As per my requirement, i have to add few new key fields in an existing table.
    Now total number of key fields are 17, but while saving this is giving me an syntax error stating 'According to SAA standard key fields cannot be more that 16'.
    I s there any other go? i can not reduce the number of key fields.
    Regards,
    Pankaj.
    Edited by: Pankaj Bist on Sep 5, 2008 3:24 PM

    Hi,
    In the se11 transaction,In the menu bar o like this.
    Utilites-->Database Utility and the Press the button Activate and Adjust Database.
    Note:
    Make sure that you total data in the table to be downloaded into ur system.
    As ctivate and Adjust Database makes data to be deleted.
    Regards,
    Rama.

  • Only key fields of table-cluster in where-condition for better performance?

    Hi,
    Say my cluster table is having following key fields: KEY1, KEY2, KEY3, KEY4.
    And, my table-cluster is having following key fields: KEY1, KEY2, PAGENO .. [PAGENO is always there in a table-cluster].
    Now, I have two versions of my (Open SQL) SELECT-WHERE clause:
    a) SELECT *
        WHERE KEY1 EQ LV_KEY1
             AND KEY2 EQ LV_KEY2
             AND KEY3 EQ LV_KEY3.
    b) SELECT *
        WHERE KEY1 EQ LV_KEY1
             AND KEY2 EQ LV_KEY2.
    Please guide me whether version (a) or version (b) will be executed faster? In case of version (b), I will have to filter data using ABAP code corresponding to KEY3.
    Regards,
    Kamlesh Dhera H. R.

    I think most experienced ABAPrs would tell you to try both, compare runtimes, and use the one that's more efficient.  SAP provides "get run time field <fieldname of type i>.  Get run time at start, get run time at end, and subtract start from end to get the time in microseconds (1 second / 1,000,000 ).
    Run several times to minimize effect of buffering and system load activity, and you'll see which method produces lower run time.

  • Which FM can append table sturcture(add key fields and so on)

    Hi everybody,
    does any one of u know a FM which append structures of table (to add the key fields and so on) in ABAP dictionary.
    The FM DDIF_TABL_PUT is only used to write a new table and I don't want to call this FM twice to realize my application.
    Thanks in advance!
    Liying

    Hi Raja,
    I got a runtime error:Perform_NOT_FOUND
    EXCEPTION:CX_SY_DYN_CALL_ILLEGAL_FORM
    following is my codes:
    DATA ATA DDFIELDS LIKE DDFIELD OCCURS 2 WITH HEADER LINE.
    DATA NAME LIKE DD02L-TABNAME.
    DDFIELDS-FIELDNAME = 'F3'.
    DDFIELDS-POSITION = '3'.
    DDFIELDS-KEYFLAG = 'X'.
    DDFIELDS-DATATYPE = 'INT4'.
    APPEND DDFIELDS.
    DDFIELDS-FIELDNAME = 'F4'.
    DDFIELDS-POSITION = '4'.
    DDFIELDS-KEYFLAG = ''.
    DDFIELDS-DATATYPE = 'INT4'.
    APPEND DDFIELDS.
    NAME = 'ZTEST'.
    CALL FUNCTION 'DB_ADD_TABLE_FIELDS'
        EXPORTING
            TABNAME = NAME
        TABLES
            DDFIELDS = DDFIELDS
        EXCEPTIONS
            FIELDS_NOT_ADDED = 01
            PROGRAM_NOT_GENERATED = 02
            PROGRAM_NOT_WRITTEN = 03
            TABLE_DOES_NOT_EXIST = 04.
    What might be the reason?
    B.R.
    Liying

  • Creating Condition Table.. Key fields and line items

    dear all
    I am creating a Condition table and have 6 fields, I want to make 5 of them as key fields and also header line fields.
    I want my 6th field as line item field but I am unable to do that. My last key field is also shoiwing in line item.
    Please help.
    Thank you.
    Madhu.

    Hi,
    Check this thread
    Re: VK11
    Regards,
    Chandra

  • Key fields are not visible in output condition table

    Hi,
         I have created few conndition tables using V/61. But i can not see Key field. It is not displaying. But when I check thru VK11 i can see that all fields are marked as key fields. example of table B018.
    My problem is that , i want to make few filed non key fields rest of fileds as key fields so that there should not be any duplicate ntry based on key fields. also I do not want to maintain these two fields for each record.
    Is there any exit to modify and view thesefields? or it is a security issue...bold
    Your earliest response is highly appreciated.\
    Thanks,
    AKS

    Hi Raga,
    Please check the documentation under the customizing path:
    IMG -> Sales and Distribution -> System Modifications ->
    Create New Fields (Using Condition Technique) ->
    New Fields For Pricing
    Then click on the paper icon
    Here is explained how to setup additional fields for pricing,
    not present in the standard.
    Notice the following rules:
    1. the new fields must have name beginning with 'ZZ' or 'YY' in order
       to avoid problem after upgrade
    2. add the new field in the table T681F for the application 'V' and the
       usage 'A'
    3. these new fields must be appened to the structures KOMKAZ or KOMPAZ
       (depending they are header or item fields)
    4. you should provide these fields by implementing the userexits
       USEREXIT_PRICING_PREPARE_TKOMK (header fields)
       USEREXIT_PRICING_PREPARE_TKOMP (item fields)
       in program MV45AFZZ for sales order, RV60AFZZ for invoice.
    In that documentation there are some examples too.
    Please check it.
    Regards,
    Alex

  • Key fields and non-key field of condition table

    Hello Gurus,
          what is key fields and non-key field of condition table?
    thanks very much!

    Key field
    Each condition table contains keys that can be used for creating dependent condition records.
    for example let take condition type PR00.
    PR00 uses access sequence PR02 .
    Access sequence PR02 has following tables associated with it namely 304, 305 & 306
    When you create a conditon record for PR00 with transaction VK11 or VK31, you have a button 'key combination' which is nothing but fields associated with tables 304, 305 & 306.
    In brief, Condition records are always created using specific keys. Condition tables are used to define the structure of the keys of a condition record.
    Non key field
    For example take condition table 144 - sales deal basic data.
    Table 144 is associated with access sequence PBUD.
    If you check the fields associated with this table (click technical view button), there are three fields at bottom which do not have 'key' check mark -KDATU, PLTYP, KSTAF
    So, when you create a condition record for PBUD, system does not propose these 3 fields in 'key combination' and hence are non key fields.
    Please reward points for good answers as this would help increase the total donation that SAP will make to the United Nations World Food Programme.

  • Changing the length of a key field in a table

    Hi,
    I want to increase the length of the field from 2 to 4 in a standard SAP table and deliver it to the customers. This field is a key field in table. This field from this table is also used in view and view clusters.
    What is the implication of changing the length to the customers. The customers would have already data in this field and they should not loose any data. Will the existing data for customers remain at length 2 or do they have to do some conversion?
    Regards,
    Srini.
    Edited by: Srinivasa Raghavachar on Feb 7, 2008 12:45 PM

    hi,
    The database table can be adjusted to the changed definition in the ABAP Dictionary in three different
    ways:
    By deleting the database table and creating it again. The table on the database is deleted, the inactive
    table is activated in the ABAP Dictionary, and the table is created again on the database. Data
    existing in the table is lost.
    By changing the database catalog (ALTER TABLE). The definition of the table on the database is
    simply changed. Existing data is retained. However, indexes on the table might have to be built again.
    By converting the table. This is the most time-consuming way to adjust a structure.
    If the table does not contain any data, it is deleted in the database and created again with its new
    structure. If data exists in the table, there is an attempt to adjust the structure with ALTER TABLE. If the
    database system used is not able to do so, the structure is adjusted by converting the table.
    Field 1     Field 2,    Field 3
    NUMC,6  CHAR 8    CHAR, 60
    Field 1    Field 2       Field 3
    NUMC,6 CHAR, 8     CHAR,30
    The following example shows the steps necessary during conversion.
    Starting situation: Table TAB was changed in the ABAP Dictionary. The length of field 3 was reduced
    from 60 to 30 places.
    The ABAP Dictionary therefore has an active (field 3 has a length of 60 places) and an inactive (field 3
    still has 30 places) version of the table.
    The active version of the table was created in the database, which means that field 3 currently has 60
    places in the database. A secondary index with the ID A11, which was also created in the database, is
    defined for the table in the ABAP Dictionary.
    The table already contains data.
    Step 1: The table is locked against further structure changes. If the conversion terminates due to an
    error, the table remains locked. This lock mechanism prevents further structure changes from being
    made before the conversion has been completed correctly. Data could be lost in such a case.
    Step 2: The table in the database is renamed. All the indexes on the table are deleted. The name of the
    new (temporary) table is defined by the prefix QCM and the table name. The name of the temporary
    Step 3: The inactive version of the table is activated in the ABAP Dictionary. The table is created on the
    database with its new structure and with the primary index. The structure of the database table is the
    same as the structure in the ABAP Dictinary after this step. The database table, however, does not
    contain any data.
    The system also tries to set a database lock for the table being converted. If the lock is set, application
    programs cannot write to the table during the conversion.
    The conversion is continued, however, even if the database lock cannot be set. In such a case
    application programs can write to the table. Since in such a case not all of the data might have been
    loaded back into the table, the table data might be inconsistent.
    You should therefore always make sure that no applications access the table being converted
    during the conversion process.
    Step 4: The data is loaded back from the temporary table (QCM table) to the new table (with MOVECORRESPONDING).
    The data exists in the database table and in the temporary table after this step.
    When you reduce the size of fields, for example, the extra places are truncated when you reload the
    data.
    Since the data exists in both the original table and temporary table during the conversion, the storage
    requirements increase during the process. You should therefore verify that sufficient space is available in
    the corresponding tablespace before converting large tables.
    There is a database commit after 16 MB when you copy the data from the QCM table to the original
    table. A conversion process therefore needs 16 MB resources in the rollback segment. The existing
    database lock is released with the Commit and then requested again before the next data area to be
    converted is edited.
    When you reduce the size of keys, only one record can be reloaded if there are several records whose
    key cannot be distinguished. It is not possible to say which record this will be. In such a case you should
    clean up the data of the table before converting.
    Step 5: The secondary indexes defined in the ABAP Dictionary for the table are created again.
    Step 6: The temporary table (QCM table) is deleted.
    Step 7: The lock set at the beginning of the conversion is deleted.
    If the conversion terminates, the table remains locked and a restart log is written.
    Caution: The data of a table is not consistent during conversion. Programs therefore should not access
    the table during conversion. Otherwise a program could for example use incorrect data when reading the
    table since not all the records were copied back from the temporary table. Conversions therefore
    should not run during production! You must at least deactivate all the applications that use tables to
    be converted.
    You must clean up terminated conversions. Programs that access the table might otherwise run
    incorrectly. In this case you must find out why the conversion terminated (for example overflow of the
    corresponding tablespace) and correct it. Then continue the terminated conversion.
    Since the data exists in both the original table and temporary table during conversion, the storage
    requirements increase during conversion. If the tablespace overflows when you reload the data from the
    temporary table, the conversion will terminate. In this case you must extend the tablespace and start the
    conversion in the database utility again.
    If you shorten the key of a table (for example when you remove or shorten the field length of key fields),
    you cannot distinguish between the new keys of existing records of the table. When you reload the data
    from the temporary table, only one of these records can be loaded back into the table. It is not possible
    to say which record this will be. If you want to copy certain records, you have to clean up the table
    before the conversion.
    During a conversion, the data is copied back to the database table from the temporary table with the
    ABAP statement MOVE-CORRESPONDING. Therefore only those type changes that can be executed
    with MOVE-CORRESPONDING are allowed. All other type changes cause the conversion to be
    terminated when the data is loaded back into the original table. In this case you have to recreate the old
    state prior to conversion. Using database tools, you have to delete the table, rename the QCM table to
    its old name, reconstruct the runtime object (in the database utility), set the table structure in the
    Dictionary back to its old state and then activate the table.
    If a conversion terminates, the lock entry for the table set in the first step is retained. The table can no
    longer be edited with the maintenance tools of the ABAP Dictionary (Transaction SE11).
    A terminated conversion can be analyzed with the database utility (Transaction SE14) and then
    resumed. The database utility provides an analysis tool with which you can find the cause of the error
    and the current state of all the tables involved in the conversion.
    You can usually find the precise reason for termination in the object log. If the object log does not
    provide any information about the cause of the error, you have to analyze the syslog or the short dumps.
    If there is a terminated conversion, two options are displayed as pushbuttons in the database utility:
    After correcting the error, you can resume the conversion where it terminated with the Continue
    adjustment option.
    There is also the Unlock table option. This option only deletes the existing lock entry for the table .
    You should never choose Unlock table for a terminated conversion if the data only exists in the
    temporary table, i.e. if the conversion terminated in steps 3 or 4. table for table TAB is therefore QCMTAB.
    Hope this is helpful,Do reward.

  • How to add a new data element for existing table filed(Primary key field)

    Hi Experts,
    How to add a new data element for existing table field(Primary key field)
    For this filed ther is no foreign key relation ships and even check table.
    while activating table it is giving message like below.
    can you help any one to solve this and wil steps to add new dataelement for existing primary key filed of a table.
    Check table (NAMING SPACE/TABLE NAME(EX:/TC/VENDOR)) (username/19.02.10/03:29)           
    Primary key change not permitted for value table /TC/VENDOR
    Check on table  /TC/VENDOR resulted in errors              
    Thanks
    Ravi

    Hi,
    Easiest way is to download the table eg into an Excel table (if possible) or text table. Drop the table from the database. Build your table with the new key field. Build the database table again and fill it.
    You can do it also over the database into a new table. Drop the old one. Build the enhanced one and fill it. Afterwards drop your (temporary) table.
    Maybe there are other ways, but this works.
    Success,
    Rob

  • About key fields in a table

    Hi,
    I'm actually finding out differences between two tables in remote systems. table name would be given as input parameter, and i'll query the remote SAP system and get the table entries in the remote system and compare them with the table entries in the logon system. Now is there any way, that I can find out which fields are the key fields of table, at run time, having in mind that since everything is at run time, i would be processing using field symbols. So is there anyway to find out which fields in any table are the key fields. Any inputs would be of great help.
    Regards,
    Vijay

    HI vijay
    use the FM
    CALL FUNCTION 'GET_KEY_FIELDS_OF_TABLE'
      EXPORTING
        TABNAME             =<b> <table name></b>
      MANDT_NEEDED        = ' '
      TABLES
        KEY_FIELDTAB        = <b><table to hold the key field ex. data: itab like dfies occurs 0. ></b>
    EXCEPTIONS
      NOT_SUPPORTED       = 1
      OTHERS              = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    <b>Loop at itab.
    write: itab-fieldname.
    endloop.</b>
    regards
    kishore
    Message was edited by: Harikishore Sreenivasulu

  • How to Edit Key Fields or Delete Lines from Table Entries

    Hi Experts
    While releasing Transport Request Number we are getting an error during release. This seems to be as a result of improper data feed while running of eCATT's . The dates in the all these fields have been entered as "  .   .0101" which is in the wrong format ( eg. Table T811F u2013u201CSDATEu201D field). "SDATE" seems to the key field of the table . Can you please guide on how we may delete these lines or edit the field in the table.
    Regards
    Ananda

    Hello,
    I dont think its a good idea to delete the records from those standard tables. You rather re-run your ecatt and edit/update the existing records and try.
    regds,
    Kiran

Maybe you are looking for

  • Can't copy mp3s from hard drive to iTunes like I used to

    Hi all, Using itunes before I was able to open my music folder, select the tracks I wanted to listen to and just drop them in itunes - like drag and drop. Now whenever I try to do it, the cursor turns into a cricle with a line through it. The thing i

  • Aeroflex 2975 driver for LabVIEW 8.0

    Is there a way to convert the Aeroflex IFR 2975 driver for LabVIEW CVI for use in LabVIEW 8.0?  OR, is there a driver already developed for this? 

  • RoboHelp for Word - Breadcrumb Links in .CHM?

    From what I've read, 8.0 supports breadcrumbs in .CHM files but I can't find any reference to it in RoboHelp for Word.  If I create a new blank project in RoboHelp for HTML and go to generate the .CHM, I get the breadcrumb option and it works correct

  • Printing a chart

    is there a way to automaticaly print the chart that is generated when i run my VI. basically i am measuring a voltage for about 1 min and diplaying it on a chart. i want it to automatically either save the data to an excel sheet and/or print the char

  • NoSuchMethodError: NamespacePrefixMapper.getPreDeclaredNamespaceUris2

    I'm trying to consume a web service using wsimport to create the proxy classes, but when I try to invoke a web service operation, I'm receiving the following error: Even though I have jaxb-impl.jar on the classpath which contains NamespacePrefixMappe