Compare Table fields

I want to compare tables and fields(not values)... which Tcode I can use?

Hi,
Compare Tables.  --> SCU0
Compare Tables.  --> OY19
Regards
Sudheer

Similar Messages

  • Sorting techinque without using sort statement /Comparing table fields.

    Hi,
    How to achieve sorting techinque without using sort statement in tables.
    Also how to compare fields of 2 custom tables and check their compatability without using code ?

    Hi,
    Refer the below program, it will be helpful.
    types: begin of t_int,
             int type i,
            end of t_int.
    data: it_int type standard table of t_int,
           wa_int type t_int,
           wa_int1 type t_int.
    wa_int-int = 70.
    append wa_int to it_int.
    clear wa_int.
    wa_int-int = 50.
    append wa_int to it_int.
    clear wa_int.
    wa_int-int = 20.
    append wa_int to it_int.
    clear wa_int.
    wa_int-int = 30.
    append wa_int to it_int.
    clear wa_int.
    wa_int-int = 23.
    append wa_int to it_int.
    clear wa_int.
    wa_int-int = 23.
    append wa_int to it_int.
    clear wa_int.
    wa_int-int = 32.
    append wa_int to it_int.
    clear wa_int.
    wa_int-int = 77.
    append wa_int to it_int.
    clear wa_int.
    wa_int-int = 99.
    append wa_int to it_int.
    clear wa_int.
    wa_int-int = 1.
    append wa_int to it_int.
    clear wa_int.
    wa_int-int = 11.
    append wa_int to it_int.
    clear wa_int.
    wa_int-int = 90.
    append wa_int to it_int.
    clear wa_int.
    wa_int-int = 40.
    append wa_int to it_int.
    clear wa_int.
    data: wk_line type i.
    data: cnt type i.
    data: cnt1 type i.
    describe table it_int lines wk_line.
    clear: cnt,cnt1.
    data wk_flag type c.
       clear wk_flag.
    while wk_line gt cnt1.
       cnt = cnt + 1.
       read table it_int into wa_int index cnt.
       cnt1 = cnt + 1.
       read table it_int into wa_int1 index cnt1.
       if wa_int-int lt wa_int1-int.
         modify it_int from wa_int index cnt1.
         modify it_int from wa_int1 index cnt.
         wk_flag = 'X'.
       endif.
       if cnt1 eq wk_line.
         clear: cnt, cnt1.
         if wk_flag eq 'X'.
         clear wk_flag.
         continue.
         else.
           exit.
         endif.
       endif.
    endwhile.
    loop at it_int into wa_int.
       write: / wa_int-int.
    endloop.

  • How to compare two fields from the same table in the select statement

    Hi, friends
    I try to compare tow fields from the same table, but no result,
    For example, this
    data: cptotchek tyep i.
    select count(*) into cptotchek
    from aufk where erdat = aufk-idat2 .
    The result is  cptotchek = 0, but there are the records in aufk , where,  aufk-erdat = aufk-idat2.
    Please, help me, i don't use the loop statement for optimize my program.
    Regards

    Hi  ,
           it will not return  any value   when you are using   column of same table 
           such as Date Field   , Because  while Using Aggregate Function  it will not check with self column
    .      For that you have to take data in one internal table and then you can work on it  .
         And if you are worried about Performance  it will not affect  , untill you are selecting only required data  .
    you can try this way  .
    data: cptotchek type i.
    types : begin of  w_aufk.
            include structure aufk  .
          types : end of  w_aufk .
    data : it_aufk type standard table of w_aufk with header line  .
    select * into corresponding fields of table it_aufk
    from aufk  .
    loop at it_aufk .
    if it_aufk-erdat  = it_aufk-idat2 .
    write : / it_aufk-erdat , it_aufk-idat2 .
    else .
    delete it_aufk .
    endif  .
    endloop.
    Regards
    Deepak.

  • How to compare table's date field with dropdown year field

    Hi All,
    I have one requirement to display the selected rows from a database table based on the selection of drop down.
    Here, I have one dropdown of year(like 2009,2010,....) and I have one database table which contains one field with "DATE".
    Now, I want to compare table's DATE field with my dropdown field.
    Problem is that table's DATE field is of type "DATS" and dropdown is of type INTEGER(or) STRING ...
    How to compare this fields?
    Can any one please give me solution for this...!
    Thanks in Advance!

    Hi  sreelakshmi.B,
    try the following:
    DATA lt_dats        TYPE TABLE OF dats.
    DATA l_dat_i        TYPE          i.
    DATA l_dat_c_4(4)   TYPE          c.
    DATA l_dat_c_12(12) TYPE          c.
    DATA l_dats_from    TYPE          dats.
    DATA l_dats_to      TYPE          dats.
    *Move Date from Integer to Char
    l_dat_c_4 = l_dat_i = 2005.
    *Create Date From use in WHERE-Clause
    CONCATENATE '01.01.' l_dat_c_4 INTO l_dat_c_12.
    CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
         EXPORTING
              date_external            = l_dat_c_12
         IMPORTING
              date_internal            = l_dats_from
         EXCEPTIONS
              date_external_is_invalid = 1
              OTHERS                   = 2.
    IF sy-subrc <> 0.
    ENDIF.
    *Create Date To use in WHERE-Clause
    CONCATENATE '31.12.' l_dat_c_4 INTO l_dat_c_12.
    CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
         EXPORTING
              date_external            = l_dat_c_12
         IMPORTING
              date_internal            = l_dats_to
         EXCEPTIONS
              date_external_is_invalid = 1
              OTHERS                   = 2.
    IF sy-subrc <> 0.
    ENDIF.
    * Select records in range
    SELECT *
           FROM [DBTAB]
           INTO TABLE [ITAB]
           WHERE [DATE] BETWEEN l_dats_from
                        AND     l_dats_to.
    Regards
    REA

  • How to compare table data and table field

    Hi buddy,
        I have some question about how to compare table data and table field.
       1. I know there is one method:   CL_ABAP_UNIT_ASSERT=>ASSERT_TABLE_CONTAINS  , it use in unit test to compare the table data(A and B) , you can loop table A into structure A1, then use this mehtod it can compare whether table B contain structure A1.  but when I try to use this in main program it will dump.
              CL_ABAP_UNIT_ASSERT=>ASSERT_TABLE_CONTAINS(
                                                                                                        LINE    = A1
                                                                                                        TABLE = B ).
           Is there any method or FM can be used to compare the table data ?
        2. I also want to compare two table field , try to find out the different. How to realize this.
    Thank you for your sincerely answer.

    Hi Zongjie,
    What`s the difference, if you using loop A into wa_A, read table B into wa_B with all field, then compare with wa_A and wa_B.
    The question 2, seems no standard FM available here.
    Loop A into wa_A.
       Loop B into wa_B.
           if wa_A-field1 eq wa_B-field1.
           endif.
            if wa_A-field2 eq wa_B-field2. 
           endif.
       endloop.
    endloop.
    regards,
    Archer

  • Do you know of a standard tool to compare the fields of 2 database tables?

    do you know of a standard tool to compare the fields of 2 database tables? please note i dont want to compare data just the fields.
    ~Suresh

    Hi,
    I am not aware any standard tool but you can write custom report to use FM DDIF_FIELDINFO_GET to get fields information of SAP database table.
    Call the above FM twice in order to get field names for two different database tables. Then compare the results (table parameter DFIES_TAB) to find out the differences of field names.
    Hope this will help ...
    Regards,
    Ferry Lianto

  • Compare two fields of one table in selection.

    Dear Experts,
    I want to compare two fields of a table and make selection according to this.
    Ex: simply i want to select the rows from table mard where mard-labst>mard-insme. Could you write me the code to make this selection.

    Yes, Thomas,
    Its working:
    Sample code:
    data: begin of itab occurs 0,
          matnr type matnr,
          ernam type ernam,
          end of itab.
    select matnr ernam
           into table itab
           from mara where brgew > mara~ntgew.
    loop at itab.
      write: itab-matnr.
    endloop.
    Or,
    Try with inner join once.
    Its working: Sample code.
    data: begin of itab occurs 0,
          matnr type matnr,
          ernam type ernam,
          end of itab.
    select p~matnr q~ernam
           into table itab
           from mara as p
           inner join mara as q
           on p~brgew > q~ntgew.
    loop at itab.
      write: itab-matnr.
    endloop.
    Thanks,
    Naveen.I

  • Excise table & Field info in Quotation comparative sheet

    Dear All,
    Can you please help me in finding for Excise table & Field info used  in execution of Quotation comparative sheet which is Z transaction list will be created.
    with regards,
    manoj KS

    hi merra,
    Pl find tax info in outgoing excise invoice PLD on following table
    OEI12 - Outgoing excise invoice - Tax Extension.
    Tax info will flow from CRD7(BP master) > INV11(AR invoice)>
    OEI12(Outgoing excise invoice)
    Hope above solution will solve your problem.
    with regards,
    A.Jeyakanthan

  • How to compare table in different versions?

    Hi,
    Please let me know how to comare table fields in different versions?
    Ex: I need to compare the table fields of version 4.5 with ECC6.0.
    Thank you.

    Hi,
      goto Se11 Transaction -> enter table -> display.
    Utilities ->Version -> version management
    now click on remote comparison -> enter target system.
    Regards
    Kiran Sure

  • Table Field Short Descriptions

    If you go into the Repository Information System (SE83), then drill down to ABAP Dictionary->Fields->Table Fields, you are allowed to enter a table name to display its fields and short descriptions.  I need to know what table the short descriptions are stored.  I assumed it was DD03T, but I'm not able to locate most of my field descriptions for the MM module.  Can anyone help?
    Thanks!

    Sheshu... The DD03M seems to be missing some positional data even though its viewable in SAP TCode ZSE16R.
    Check this out as an example:
    Look at table CSKS fields by using ZSE16R, then go to the choose fields option in the Settings>List Format menus.  Then compare that to the data that is in DD03M. 
    Examples of missing fields form DD03M for table CSKS:
    MANDT
    PKZKP
    VERAK
    WAERS
    Can you tell me why this data isn't present in the DD03M table?
    Thanks

  • Ordering a block by a non-base table field

    Hello,
    I have heard you can order your block by a
    non-base table field by using a stored function. Does anyone know how to do this?
    Lisa

    In a WHEN-VALIDATE-ITEM user have to press ENTER or TAB key too !!
    anyway he have to press something.
    KEY-NEXT-ITEM and KEY-PREVIOUS-ITEM is a good choice.
    You can create a timer who fire each second, verify that user enter something new in the field (by comparing old and new value), then do execute_query

  • Comparing the fields of one file to another file

    Hi guys,
    Is it possible to compare the fields of one file to another file using ABAP?
    I have a file extracted from SAP and I want to compare my extracted file to another file using ABAP?
    How am I going to do it?
    Thanks a lot!
    Rgds,
    Mark

    Mark,
    How to read the file from appli. server to internal table:
    DATA : v_fpath TYPE salfile-longname VALUE
                                   '/data/sapdata/inc/inbox/ppm_maint_plan'.
    DATA : BEGIN OF i_records OCCURS 0,
            rec TYPE string ,
          END OF i_records.
    DATA : BEGIN OF it_input,
                 tplnr LIKE iflot-tplnr,
                 stjobno(22),
                date1(10),
                frequency(10),
                sortfield(20),
                ilart LIKE t353i-ilart,
            END OF it_input.
    OPEN DATASET v_fpath  FOR INPUT IN TEXT MODE.
        DO.
          READ DATASET v_fpath_te INTO i_records-rec .
          IF sy-subrc EQ 0.
              SPLIT i_records-rec AT c_coma INTO it_input-tplnr
                                                 it_input-stjobno
                                                 it_input-date1
                                                 it_input-frequency
                                                 it_input-sortfield
                                                 it_input-ilart.
              APPEND it_input.
              CLEAR it_input.
          ELSE.
            EXIT.
          ENDIF.
        ENDDO.
        CLOSE DATASET v_fpath .
    Note :  it_input is the internal table .If you don't know the columns structure.Declare your internal table (it_input ) fileds as "char" with some length.
    Do same thing for another file.
    SORT : both internal tables.
    LOOP AT it_input.
      LOOP AT SECON_internaltable.
        compare the fields here..
      ENDLOOP.
    ENDLOOP.
    Pls. reward if useful....

  • Compare the fields

    Hello Friends,
    I want to compare the fields of MKPF-XBLNR = LIPS-VBELN. But the length of these fields are differ.How i do this.
    Thanks in advance
    Regards
    said

    Hi ,
    Create a field in internal table which is of same size like VBELN, move the comtents of XBLNR into that, so that the lenght of XBLNR & VBELN will be same. Then u can compare both the fields without error.
    Rgds,
    Sachin.

  • PL/SQL - Large tables field comparison...

    Dear Friends,
    I have a query,
    There are two tables, with the same table structure. I want to compare these tables and indicate the rows that have been modified. Depending on that result I will be performing further action. Can anyone suggest me how can I compare these fields effectively. [The size of table is approx. 5 GB. These tables have around 60 columns and around 1 million records.]
    Thanks in advance and hoping to get quick reply.
    -Zak.
    null

    Thanks very much for the quick reply.
    By using 2 cursors one for each tables and comparing each record (field wise) one by one will it make difference. Becoz I need to compare each and every field of that records, If there is any diff. in any one field then I will have to perform some operations.
    Thanks,
    -Zak.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by [email protected] - ([email protected]):
    Dear Friends,
    I have a query,
    There are two tables, with the same table structure. I want to compare these tables and indicate the rows that have been modified. Depending on that result I will be performing further action. Can anyone suggest me how can I compare these fields effectively. [The size of table is approx. 5 GB. These tables have around 60 columns and around 1 million records.]
    Thanks in advance and hoping to get quick reply.
    -Zak.<HR></BLOCKQUOTE>
    null

  • Unable to access the data and table fields from handheld

    Hi,
    I've created a Testing.sdf file on the local pc using SQL Server Management Studio, creating table, fields and insert some data. in local pc i can access the the data as normal. the problem is after i moved the file to handheld device i
    cannot access the data within the table, it shown error 'Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)' . I tried to google it, but still got no solution.
    Thanks,

    'Name Space
    Imports System.Data.SqlServerCe
    'String Connection
    'Data Source = D:\SKUDWN3 .sdf'
    Public Sub CreateDB(ByVal StrConn As String)
            'Declaration
            Dim cn As SqlCeConnection = Nothing
            Dim cm As SqlCeCommand = Nothing
            Dim SQLEngine As SqlCeEngine = Nothing
            Dim rs As SqlCeResultSet = Nothing
            Dim rec As SqlServerCe.SqlCeUpdatableRecord = Nothing
            'Tables -
            Const TB_SKUDWN3 As String = "SKUDWN3"
            'Fields TB_SKUDWN3
            Const FL_SKUDWN3_UPC As String = "UPC"
            Const FL_SKUDWN3_SKU As String = "SKU"
            Const FL_SKUDWN3_LD As String = "LD"
            Const FL_SKUDWN3_SD As String = "SD"
            Const FL_SKUDWN3_AN As String = "AN"
            Const FL_SKUDWN3_Price As String = "Price"
            Const FL_SKUDWN3_GST_FLAG As String = "GSTFLAG"
            'Create Database
            SQLEngine = New SqlCeEngine(StrConn)
            SQLEngine.CreateDatabase()
            SQLEngine.Dispose()
            'Open Connection
            If IsNothing(cn) Then cn = New SqlCeConnection(StrConn)
            If cn.State = Data.ConnectionState.Closed Then cn.Open()
            cm = cn.CreateCommand
            'Create Table, Fields
            cm.CommandText = "CREATE TABLE " & TB_SKUDWN3 & " (" & FL_SKUDWN3_UPC & " NVARCHAR (13)," & _
                " " & FL_SKUDWN3_SKU & " NVARCHAR (9), " & FL_SKUDWN3_LD & " NVARCHAR(30)," & _
                " " & FL_SKUDWN3_SD & " NVARCHAR (18), " & FL_SKUDWN3_AN & " NVARCHAR(15), " & _
                " " & FL_SKUDWN3_Price & " NVARCHAR (10), " & FL_SKUDWN3_GST_FLAG & " BIT)"
            cm.ExecuteNonQuery()
            'Close Connection
            cm = Nothing
            If Not IsNothing(cn) Then
                If cn.State = ConnectionState.Open Then cn.Close()
                cn.Close()
                cn.Dispose()
            End If
        End Sub
    'The DB was successfully created, but after moving to Handheld the fields of table can't be accessed

Maybe you are looking for

  • How to take a dmp from my designer user

    dear friends i'm new with oracle designer i created a uers named ERP and granted all the needed privilages then i succeded to install the reprosotry after that i created a new application folder and i created my ERD digram successfuly then i managed

  • Integrating Discoverer in a Publiehr report

    Héllo, I try to make a report based on a Discoverer query, but I've got problems creating the data model. I followed the instructions of this site : http://webcache.googleusercontent.com/search?q=cache:65B0_hSn0R8J:www.rittmanmead.com/2007/09/integra

  • JBO-27101: Attempt to access dead entity in EO exception

    Hi, I have developed a new OAF page based on SubTabLayout. It is having a read only header region and in the tabs users are supposed to enter data which will be saved in a custom table. I have added 3 buttons to the page "Clear All", "Save", "Continu

  • Order with Serialized PTO Item with IB reference and Serial Number

    I want to get to Orders with Serialized PTO Item with IB reference and their Serial Numbers. I would like to know how I can link sales orders to IB. I wrote the foll. sql query but I am not sure if this is accurate. I am fairly new to this.. so any h

  • Problem using Human Task

    I have created the BPEL work flow with human task which works for serial flow. I have 2 approvals, i want to get status of each approval after they approves. Please let me know what to do as i was not able to find any example for multiple approvals.