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

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 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

  • Add a custom table for field selection while creating field catalog for LIS

    Hi,
    I have a requirement to add a Custom table to be available for field selection while creating a field catalog for LIS. Its required as there are many custom fields to be used for field catalog creation and adding them in one of the existing tables listed is not a feasible option for us. Please let me knw if its possible..?? If yes how to get it done..??
    Regards,
    Akash Sinha

    hi,
    You need to add your field in the Data Dictionary first. For example, if
    you want the new field in the Order Item field catalog do the following.
    Look at structure MCVBAPUSR (SE11). If you already have a user structure
    appended to this structure then you can add your new field to your existing
    structure. If there is no structure already appended to MCVBAPUSR then you
    must create a new structure with your field in it and then append the new
    structure to this one.
    If you look at structure MCVBAP you will see the data appended to the end
    of it.
    Now you should see it in the field catalog.
    regards,
    balajia

  • Table ROOSFIELD Field "SELECTION"  value "A"

    Hello,
    My problem is as follows:
    I want to extract the fields REFBN, REFBK, REFGJ etc. from CO to BW using the data source 0CO_OM_CCA_9. These fields are included in the structure BWOM2_REFBLG which in turn included in the extraction structure ICCTRCSTA1 relevant to 0CO_OM_CCA_9.
    However the fields REFBN etc. are NOT visible in the data source 0CO_OM_CCA_9 using transaction RSA6.
    I therefore checked the table ROOSFIELD and the settings for the field SELECTION in this table was set to "A" (Field in BW & OLTP hidden by SAP) for the fields REFBN etc. Therefore the fields REFBN etc. are not visible in the DataSource.
    I would like to know the following:
    1. What is the significance of the value "A" for the field SELECTION?? I mean, why would SAP want to hide a particular field??
    2. What are the consequences of changing the settings from A to something else??
    I look forward to your reply. Thanks in advance.
    Raja
    Message was edited by: Rajasekhar Chalasani

    Hi Raja,
    give it a try and change the value to space using a little test abap and maintain the datasource again. After all, test it in rsa3 before you replicate it.
    I already did the same a few times and it worked. It might be possible that a field will not work as selection field but feel free to try.
    Sometimes you find some of these fields and there is a oss note available, telling that sap decides in some case whether it makes sense or not to get a field with a specific extractor.
    regards
    Siggi

  • 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

  • Free PO indicator in field selection key/group

    Hi all,
    I would like to make Free PO indicator as mandatory field in PO thru specific document type field selection reference key. When I search for the field, it is not available for existing field selection key (Field selection group).
    How can I add the Free PO indicator into this field selection key/group or Does it represented in different name.
    Kindly clarify.
    With regards
    Suddy

    Hi,
    "Free Indicator" doesn't exist in field selection. If you wanto to have Free Indicator ON for a specific PO Document Type then you need to do ABAP Development for this.
    Use BAdi --> ME_PROCESS_PO_CUST
    Interface --> PROCESS_ITEM (Processing of Item Data)
    Below is the Sample Code for your reference;
    If w_bsart EQ 'ZPOD'.
        wa_item3-repos = ' '.
      ELSE.
      ENDIF.

  • Selecting Semantic Group Key Fields for Cube to Cube DTP

    Is it possible to use the semantic group key fields selection when performing a DTP between two infoCubes?  When I try to select the key field of 0CALWEEK, i am unable to as the selection screen is grayed out like I'm in display mode even though I'm in change mode for the DTP.
    Thanks,
    Matthew

    Hi,
    Have you initialized the planning area for the 11th key figure to be loaded. Make sure that the key figure which you want to load is initialized for the planning version for the respective planning area.
    Also check the loading period inside the variant is within the planning area initialized period for that key figure. And make sure that you have made the key figure assignment for the info cube and planning area inside the variant.
    thanks and regards
    Murugesan

  • 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.

  • User Table Key set up in User defined field management

    Dear  Expert,
    what is use of User Table Key set up in User defined field management in SAP B1.
    Thanks.
    Sridharan.R
    Edited by: Sridharan.R on Oct 4, 2011 8:26 AM

    Hi,
    Once a UDF is created and a value is entered in it, the same cannot be retrieved in any of the layouts and reports unless a Key is generated for that UDF. By assigning a Key to that UDF, the same UDF can be used in Crystal Reports or any other Reporting tool to extract its values from SAP. These reporting tools searches the Uniqueness of the UDF Values with this Keys only.
    For eg.: When you develop a report and select a table from which you need the fields to be shown in the layout. In that, the only fields whose keys are generated are only available to use in the report.
    Hope its clear to you.
    Regards,
    Papil

  • Default Primary Key Field of any database table

    hi,
    I am working on a database in which the data in the tables is generated from some other modules. I have to add, view and update functionalities to this table in the database. Unfortunately there is no primary key field for the table i am working on and as some existing modules are using this table i am not allowed to change the design of the table at this stage.
    Without primary i think its not possible to do updates. Because if all fields can have their values changed, then there will be a breakdown if the field value changes in the mid time when i had already retrieved the data to show on the screen, but not yet updated the value in the database. I hope you understood my problem.
    Please suggest solutions. I am not sure, but i think i read somewhere that every table created has a default primary associated whose value is always incresing with a new addtion of recored and its value never decreases. But i am unable to recollect the field name...i think it is some thing like[b] OID .... But i checked there is no such field name by OID. So please help me with some alternative solution...or by telling the default primary key field name.
    Thanx

    All the databases I know (namely Informix, PostgreSQL, SQL Server, even Access) have a row id column generated automatically.
    PostgreSQL example
    There is a way to read the value of this column; for example with PostgreSQL let�s say you have the following:
    CREATE TABLE no_id_column (
    column_one varchar(80),
    column_two varchar(80)
    INSERT INTO no_id_column(column_one, column_two) VALUES (�red�, �pink�);
    INSERT INTO no_id_column(column_one, column_two) VALUES (�yellow�, �orange�);Certainly, if we executed:
    SELECT * FROM no_id_column;Would obtain:
    column_one          column_two
    red               pink
    yellow               orangeBut if we modify the query
    SELECT  oid, * FROM no_id_column;We magically obtain a row identificator
    oid          column_one          column_two
    21569          red               pink
    21570          yellow               orangeThe data in the oid column is generated automatically by the database manager. Every time we insert a row we�ll have a different one. Just take into account that if the database contains a large amount of data, the oid could cycle.

  • How to read an internal table with more than  one (2 or 3) key field(s).

    how to read an internal table with more than  one (2 or 3) key field(s). in ecc 6.0 version

    hi ,
    check this..
    report.
    tables: marc,mard.
    data: begin of itab occurs 0,
          matnr like marc-matnr,
          werks like marc-werks,
          pstat like marc-pstat,
          end of itab.
    data: begin of itab1 occurs 0,
          matnr like mard-matnr,
          werks like mard-werks,
          lgort like mard-lgort,
          end of itab1.
    parameters:p_matnr like marc-matnr.
    select matnr
           werks
           pstat
           from marc
           into table itab
           where matnr = p_matnr.
    sort itab by matnr werks.
    select matnr
           werks
           lgort
           from mard
           into table itab1
           for all entries in itab
           where matnr = itab-matnr
           and werks = itab-werks.
    sort itab1 by matnr werks.
    loop at itab.
    read table itab1 with key matnr = itab-matnr
                              werks = itab-werks.
    endloop.
    regards,
    venkat.

  • Updation of Primary Key field in HR Tables (PA2001 and PA2002) - Urgent

    Can anyone please tell me how to update a primary key field in HR Tables (PA2001 and PA2002).
    I need to update sprps field in both the tables. I used HR_Infotype_Operation function module, but still it is not updating the field.
    Pls find the following code snippet for the table PA2001 and let me know if any discrepancies :
    TABLES: pa2001.
    DATA: it_pa2001 TYPE TABLE OF pa2001,
    wa_pa2001 LIKE LINE OF it_pa2001,
    DATA: date TYPE d.
    date = sy-datum - 100.
    SELECT pernr sprps begda endda FROM PA2001 INTO CORRESPONDING FIELDS OF TABLE it_pa2001
    WHERE begda BETWEEN date and sy-datum.
    WRITE:/.
    WRITE:/ 'PA 2001 Records'.
    if sy-subrc <> 0.
    WRITE:/ 'No Data Exists'.
    else.
    LOOP AT it_pa2001 INTO wa_pa2001.
    WRITE:/ wa_pa2001-pernr, wa_pa2001-sprps, wa_pa2001-begda, wa_pa2001-endda.
    ENDLOOP.
    endif.
    LOOP AT it_pa2001 INTO wa_pa2001.
    wa_pa2001-sprps = 'X'.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
    EXPORTING
    infty = '2001'
    number = wa_pa2001-pernr
    SUBTYPE =
    OBJECTID =
    LOCKINDICATOR =
    VALIDITYEND =
    VALIDITYBEGIN =
    RECORDNUMBER =
    record = wa_pa2001
    operation = 'MOD'
    TCLAS = 'A'
    DIALOG_MODE = '0'
    NOCOMMIT =
    VIEW_IDENTIFIER =
    SECONDARY_RECORD =
    IMPORTING
    RETURN =
    KEY =
    ENDLOOP.
    if sy-subrc = 0.
    write:/ 'SY-subrc is zero'.
    write:/ ' Rows modified = ', sy-dbcnt.
    else.
    write:/ 'No Record(s) updated'.
    endif.
    commit work.
    WRITE: / 'Updated Records in the Internal Table IT_PA2001'.
    SELECT pernr sprps begda endda FROM PA2001 INTO CORRESPONDING FIELDS OF TABLE it_pa2001
    WHERE begda BETWEEN date AND sy-datum..
    LOOP AT it_pa2001 INTO wa_pa2001.
    WRITE:/ wa_pa2001-pernr, wa_pa2001-sprps, wa_pa2001-begda, wa_pa2001-endda.
    ENDLOOP.

    Thanks Kiran.
    But I need to change this field as we need to lock the records, as soon as the employee fills his/her time sheets which will be sent for HR Payroll, later on.
    When I am updating directly the field the database table PA2001, its not updating but for table PA2002, only few records are being updated.
    Is there any other alternative for this problem?
    Pls reply.
    Thanks,
    Harish

  • Automated value generation for key field in db table

    Hi All
    I have created a table in SE11 and i want to autogenerate a value for the keyfield when the user adds a new record to the table. the keyfield is of type numc. this field represents a document id hence i do not want the user to physically enter in an id. Is it possible to achieve this without any additional coding. I am using a WDA app together with an adobe form to allow user to input data.
    Thanks in advance
    Regards
    Thashin Naicker

    There is one more method to do that.
    Write a query to fetch all the records from the table into any temporary internal table.
      Then, do a looping in that table & increment one temporary variable inside a loop.
    after this add first value of your primary field  to this temporary variable..
    Ex.: To add one more record with an increment to a primary key field  is shown below:
    DATA: TEMP type I.
    TEMP = 1.
    SELECT * FROM <TABLENAME> INTO TEMP_TABLE.
        ENDSELECT.
    LOOP AT TEMP_TABLE.
          TEMP = TEMP + 1.
        ENDLOOP.
    <Tablename>-<fieldname> = TEMP_TABLE-<fieldname> + TEMP.
    Note: temp is a temporay variable and temp_table is a temporary table.

Maybe you are looking for

  • Error while installing CRM 4.0 SR1 with Oracle 10.2 on Windows 2000 Server

    Hi.. I'm getting error messages in the Database Instance phase, while installing <b>CRM 4.0 SR1 with Oracle 10.2</b> on Windows 2000 Server. Following are message snippets with last few lines showing error message: <b>SAPSSEXC.log</b> [code](DB) INFO

  • IPhoto saving photos by "roll" on hard drive

    For some reason my iPhoto library is now saving all of my photos on my hard drive by "roll". I am not talking about how they are viewed from within iPhoto (I know that can be controlled under view/sort photos), but how they are saved on my hard drive

  • Conditionally Hide Dashboard Pages using Javascript.

    Hi, I would like to share a small logic i developed to Conditionally show or hide Dashboard Pages based on a Repository Variable. In the last few weeks we noticed that the ETL jobs scheduled everyday were failing due to various obvious reasons. As a

  • .MTS File export

    Anyway to export a .MTS file into a rec. format for Final Cut Pro without losing any quality. I continue to try doing it in Toast and it really kills the quality even in the best settings?

  • Can I change a new battery for my MacBook Pro 15' Retina? How?

    Can I change a new battery for my MacBook Pro 15' Retina? How?