Finding fields having different values

Hi
There are two internal tables with same structures, each holding single record. However, the values of those records are different.
I need to find out the fields in which the values are different.
How can I perform this.
Could any one help?
Thanks
Divya

Hello Divya
You could do a field-by-field comparison, e.g.:
" Read single record of each itab into work area
FIELD-SYMBOLS:
  <ld_fld1>   TYPE ANY,
  <ld_fld2>   TYPE ANY.
DO.
  ASSIGN COMPONENT syst-index OF STRUCTURE ls_record1 TO <ld_fld1>.
  ASSIGN COMPONENT syst-index OF STRUCTURE ls_record2 TO <ld_fld2>.
  CHECK ( syst-subrc = 0 ).  " assign worked
  IF ( <ld_fld1> NE <ld_fld2 ).
  ENDIF.
ENDDO.
Or you may use a more generic approach which will work for all records of itabs having the same structure. This approach gives you new, modified and deleted records: [Comparing Two Internal Tables - A Generic Approach|https://wiki.sdn.sap.com/wiki/display/Snippets/ComparingTwoInternalTables-AGeneric+Approach]
Regards
  Uwe

Similar Messages

  • Mass changes of Material Master field with different values

    Hi,
    How to change a field in Material Master for more than thousand materials. I think MM17 can only be used for mass changes of materials with same values. I need to upload different values for different materials. Is there any other way to do this.
    Thanks,
    K R Vishnu Kumar

    Hi Kumar.
    I think you have to use LSMW for mass updation for Material Master fields with different values.
    Regards,
    Rahul.

  • Adding a parameter with comma separated having different values

    i want to add a parameter with comma separated having different values of a column. e.g i have column having values from 10000 to 99999. i want to create report for the selected values of 11111,12111,131111 etc. This selection can be one or more values as desired. Second problem is restricting the records as per parameter.

    Reports doesn't allow multi-selection of a parameter in its parameter form. You need to use Oracle*Forms or an HTML Form to front end more advanced parameter form options.
    However, you could have multiple parameters and combine their selections into a single parameter in the after parameter form trigger. This would at least allow you to give the user the option for selecting up to 'n' parameters. The single parameter would have to be of type "character" and you probably want to add appropriate quotes around the values in the after parameter form trigger.
    Second problem is restricting the records as per parameter. Once you've got the comma seperated values into a single parameter (say p_myValues with a default value of '') then you can just use a lexical parameter to restrict the values as in:
    select * from emp
    where to_char(empno) in (&p_myValues)

  • Count of rows having different values

    SQL>  select  * from med;
    CERT  REC  PRIM RACE
    100    10   EN   USA
    100    11   EN   USA
    100    12   EN   USA
    100    13   SP   MX
    200    14   SP   MX
    200    15   SP   MX
    6 rows selected.
    SQL>  select  * from sub;
    CERT  REC PRIM RACE
    100    10   EN   USA
    100    11   EN   USA
    100    12   EN   USA
    100    13   SP   MX
    200    14   SP   MX
    200    15
    6 rows selected.
    SQL> select  * from den;
    CERT  REC  PRIM RACE
    100    01   EN   USA
    100    02   EN   USA
    100    03   EN   USA
    100    04   SP   MX
    200    06   SP   MX
    (cert,rec) uniquly identifies a person;
    In Den table rec =med.rec-9 or rec =sub.rec-9 which implies
                med       sub     den
    (cert,rec)=(100,10)=(100,10)=(100,01)How can I find out how many people in the table where the PRIM and RACE hold different values.?

    Hi,
    Perhaps this ,
    with med as (
    select 100 CERT,   10 rec,   'EN' prim,   'USA' race from dual union all
    select 100  ,  11,   'EN',   'USA' from dual union all
    select 100  ,  12,   'EN',   'USA' from dual union all
    select 100  ,  13,   'SP',   'MX' from dual union all
    select 200  ,  14,   'SP',   'MX' from dual union all
    select 200  ,  15,   'SP',   'MX' from dual )
    sub as (
    select 100 CERT,    10 rec ,  'EN' prim,   'USA' race from dual union all
    select 100,    11 ,  'EN',   'USA' from dual union all
    select 100,    12 ,  'EN',   'USA' from dual union all
    select 100,    13 ,  'SP',   'MX' from dual union all
    select 200,    14 ,  'SP',   'MX' from dual union all
    select 200,    15, null, null  from dual )
    den as (
    select 100 cert,    01 rec,   'EN' prim,  'USA' race from dual union all
    select 100,    02,   'EN' ,  'USA'from dual union all
    select 100,    03,   'EN' ,  'USA'from dual union all
    select 100,    04,   'SP' ,  'MX'from dual union all
    select 200,    06,   'SP' ,  'MX'from dual )
    ----- sample data
    select cert, prim, race ,count(rec) rec
    from (
    select *
    from med
    union all
    select *
    from sub
    union all
    select *
    from den
    group by cert, prim, race
    ORDER BY 1,2,3
          CERT PR RAC        REC
           100 EN USA          9
           100 SP MX           3
           200 SP MX           4
           200                 1HTH
    SS

  • Filling a field with different values depends on the country by value help

    dear experts,
                          Could any body help me out ?
    i do have a requirement that in the Screen, iam having a field say Tshirt size, which have to be populated differntly according to the country in the value help. how can i do that.
    iam mentioning what i have done:
    1. defined field and selected From Dictionary Attribute in the screen.
    2.maintained
    Field ztab-fieldname  in the chain endchain.
    please do the needful as hoe come the filedname is populated with value help for different countries?
    Edited by: Murthy Ganti on Dec 17, 2008 12:00 PM

    Hi Murty,
    You need to create a View on the different field set which might be composed across different Tables. Once the view is created you need to create a Search Help using that View by selecting the fields that will come in the Help. Below is the step by step Documentation for the Search Help Creation.
    Link 1
    http://help.sap.com/saphelp_nw04/helpdata/EN/cf/21ee2b446011d189700000e8322d00/content.htm
    Link 2
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaa5435c111d1829f0000e829fbfe/content.htm
    But after going through your statement, I have one concern. As you mentioned that you don't have any access for the calling FM in a Report Program, then I doubt whether you will have authorization for the Data Dictionary Object creation also. Just check the Roles and Authorization assigned to your user. You need the S_DEVELOP Authorization Object for any new create.
    Hope this helps.
    Thanks,
    Samantak

  • GR having different values for same quanitity

    Hi All,
        We have a Scheduling Agreement for which different GRs are posted through Inbound Delivery. The problem is, for two different GRs which were posted on the same day(for diifferent batches) having the same quanity, the GR values are different at decimal places. ie. 0.01 EUR difference.
    Scheduling Agreement : Target Qty - 326,700.000ST ;   143.35 EUR per 1000ST
    Quantiy
    Amount
    Goods Receipt 1
    7425 ST
    1064.37 EUR
    Goods Receipt 2
    7425 ST
    1064.38 EUR
    So, here, the actual amount should be 1064.37EUR (7425 x 0.14325 = 1064.37375) after roundong off to two decimal places.
    Please suggest. Thanks in advance.
    Regards,
    Rosh

    Hi,
    This will happen due to small difference of exchange rate even though there is not changes applied to exchange rate in system.
    The un-expected exchange rate difference posted during GRN is very well explained in below KBA.
    The KBA explains the real situation why this difference are caused and corresponding way to handle this type of situation.
    KBA:  1686557 - Unexpected exchange rate difference during goods receipt
    Rgds,

  • Sortable jtable with jcombo having different values

    Hi,
    I have a contacts list with name, addrerss etc., and telephone numbers where each contact can have several telephone numbers.
    The data is stored in a Derby DB in two tables with a PK and FK relationship. I need to load all the Contact fields in to a JTable where one of the columns will be the JCombos with telephone number(s) for that paticular contact.
    I have studied two neat sample code segments posted by a senior mrmber "camickr" at;
    [http://forum.java.sun.com/thread.jspa?forumID=57&threadID=637581 |http://forum.java.sun.com/thread.jspa?forumID=57&threadID=637581 ]
    Also another by " skdaga " at;
    [http://forums.sun.com/thread.jspa?threadID=749031&messageID=4284078|http://forums.sun.com/thread.jspa?threadID=749031&messageID=4284078]
    both are solid working examples.
    My problem is that I need to let the user to sort the table by columns and also filter by a text box entry. Meaning, the Combo boxes cannot have a fixed row index.
    Could someone advice if this is possible or I should use some other approach.
    Thanking you in advance,

    Hi camickr;
    Many thanks for your kind reply. I have managed to slightly modify your code to load the combos of individual telephone numbers dynamically.
    I have done so by returning a TableCellEditor from the public TableCellEditor getCellEditor(int row, int column) method, in place of storing the
    DefaultCellEditor dce1 = new DefaultCellEditor( comboBox1 ); etc., in an ArrayList.
    It goes as this. Following method is called by the return statement.
    private TableCellEditor createCellEditorWithCombo(int contactId) {
            JComboBox cmbNumbers = new JComboBox( <passed a Vector here thro' a PreparedStatement from the DB>);
            DefaultCellEditor editor = new DefaultCellEditor(cmbNumbers);
            return (TableCellEditor)editor;
        }The contactId of course could be easily desiphered from the "row" parameter then and there.
    I will follow your advice on the sorting part (on which I am yet to read the API fully) and get back with the result. Btw, I use the JDK 1.6u7 with Netbeans 6.1
    Thanking you once again for your great contributions,
    ViKARLL
    NB: By the way;
    camickr wrote:
    Well, if you look at my example you will note it uses the convertColumnIndexToModel(...). So you need to do the same thing for the row.It looks like you are referring to a diffrent post by you, since your example I worked on does not contain this method ??
    Edited by: ViKARLL on Sep 13, 2008 4:19 AM

  • Aperture shot is recorded at different values in output file

    Dear Lens users,
    Please explain why the aperture values which I used in my images for my sets that I used to profile my lenses, are showing up in the output data, in the .LCP file, as having different values. For instance, at f2.8 which I used for several lens image sets, the aperture value is listed as "2.970854" and not as 2.8. Likewise for my shot aperture of f8, the aperture value listed in the output .LCP file is 6.00000.
    There must be some technical explanation of why the apertures shown on the aperture ring(when there is one) or camera screen, traditional apertures thought of as f2.8, f4, f5.6, etc., are stated within the data files as other values, close but not the same.
    Thanks, Debra

    Thank you phototrek and T.Phanngam.
    I do not see the value "FNumber" in any of my profile .LCP Files, unfortunately, I only see only the ApertureValue(I also used "Search" for "FNumber").
    T.Phanngam - thanks very much for the pdf file on the technical white paper on the Lens Profile Creator - I have not seen this document before. I am printing it to read it thoroughly.
    Thanks to both for replies,
    Debra

  • Select a field having some content from a table

    Hi Friends,
    I had a requiremen where I need to fetch the field(having some content).
    I need to select FISTL field which is having some value (not space) from table BSIS into my internal table, so that I need to update this field value for all the line items with the same BELNR(doc number).
    My Approach:
        SELECT SINGLE FISTL FROM BSIS INTO WA_FINAL-FISTL WHERE FISTL IS NOT NULL AND
                                                               BELNR = WA_BSIS-BELNR.           
    But here if the first occurance of FISTL value in BSIS table in space, it is picking the spaces and updating my itab which means that a space value is not null.
    Please suggest me how to put condition so that I can select FISTL field having some value in it.
    Tried with read keyword also. But it is not accepting "IS INITIAL"  in where clause.
    Please look into this.
    Thanks,
    Murali

    Hello,
    You should try
    FISTL NE space
    instead of IS NOT NULL.
    As you might be aware ABAP data objects don't have 'NULL' values defined. You can use the 'NULL' values in Native SQL, but in case of Open SQL SAP says,
    "When reading with the Open SQL statement SELECT, null values can be created by aggregate functions or an outer join, but they are converted to initial values of the correct type when passed to data objects."
    Source: SAP documentation for NULL value.
    BR,
    Suhas

  • Compare and validate values between fields on different objetcs

    The main problem we are having right now is that we need to define a business's rule that compares two amounts between two different objects (in our case, account and custom object 3) and do a subtraction in order to check if the money amount value of the client is over zero to cover accidents with his insurance policy can cover the 100% of the accident or less but we need to assure that the money amount value can´t exceed the available amount (Monto Disponible).
    An example is:
    Object Account
    Available Amount: 450,00$
    Object Custom Object
    Accident's Amount: 600,00$
    Payment Amount: 600,00$
    In this example we can’t give authorization to the medical institution since the total billed amount exceeds the available amount.(The Payment Ammount > Available Ammount so there is no auth.)
    Can you tell us if this possible?. Can we make arithmetic operations between fields of different objects?.

    Dragosd,
    You can take Bob's suggestion and create a Webapplet that then displays your report information as a related item. I have a document I can send you if you need information on how to do this.
    regards
    Alex

  • Creating a Material with different values for fields in Transaction MM01

    Hello All,
    While creating a material i will be giving a Profit Center in Sales:general/plant view, which i can see in Costing1 View. If i change this in this View it automatically changes in the other View. Is there any way to give different values in the two views or then what is the significance in showing the same field again in two different views.
    Thanks,
    Shashidhar.

    Hi,
    Its just a way of showing the data in different views for user. It doesn't have any significance.
    Regards,
    Sudheer.

  • Default value in Find field of CRMD_ORDER

    Hi folks,
    Is there a way of changing the default value of the Find field in the Find tab of transaction CRMD_ORDER to the value "1 All"?
    Many thanks for your help.

    Hello Steve,
    Did you try setup settings of this window using extras ->settings ? If you check field 'open last transaction last processed' than will be open last processed message.
    Also check this post http://scn.sap.com/thread/1362888 maybe if you can use crm_dno_monitor with variant or solman_workcenter tcode (it depends of solman version).
    BR,
    SAPFan

  • ORA-01465: invalid hex number on form field having values like $0-$10k...

    Hi
    I have a form item (SPEND) of select list having values like
    $0 - $10k
    $10k - $50k
    $50k - $100k
    $100k - $250k
    $250k+
    For the new record, when I hit "SAVE” buttons it inserts the new records to the table with values ($0-$10k...)
    BUT when i edited the same record, and then try to "Apply Changes” getting following error message
    ORA-01465: invalid hex number
    Again when I change the value to null it simply allows the record to UPDATE.
    Again I changed the item to a text field i am getting same error when I try with charter (ABc...). BUT it allows to the number (123..)
    Column attribute is SPEND VARCHAR2 (15 BYTE)
    ie - when I try to update the SPEND field with the values ($0 - $10k,$10k - $50k,$50k - $100k,$100k - $250k,$250k+) I am getting above error message.
    ORA-01465: invalid hex number
    Environment:
    Oracle Apex- 4.1
    DB-11g
    Thanks,
    Amu
    Edited by: Amuly on Jul 16, 2012 5:00 PM

    Use utl_raw.cast_to_raw() function when you convert HEX value into RAW(), e.g.:
    SQL> create table ztest (ff raw(1000));
    Table created
    SQL> insert into ztest (ff) values
      2  (utl_raw.cast_to_raw('596F75207765726520646973636F6E6E65637465642066 726 F 6D207468652041494D207365727669996365207768656E20796F752073696
      3  76E656420696E2066726F6D20616E6F74686572206C6F636174'));
    1 row inserted

  • One jsp one form tag having 3 different values

    <tr>
    <td width="120%" align="right" bgcolor="#FFFFFF" colspan="4" >
    <input type="submit" value="Submit" name="Submit">
    <input type="submit" value="Delete" name="Delete">
    <input type="submit" value="Approve" name="Approve">
    </td>
    </tr>
    In Jsp have one form having 3 button with 3 different values.
    My problem is on 3 button have 3 different action called.
    i face this problem very curisal.
    So plz give me reply its very urgent
    Thanks in Advance

    Do it with javascript.
    Rather than: <input type="submit" value="Submit" name="Submit"> use a <input type="button" name="submit" value="Submit" onclick="checkClick();" />
    Then your javascript function - "checkClick" and set an indicator as to which button was clicked and then invoke the submit function.

  • Can "SPML Web Service Complex Data Type field" take multiple values ?

    In Generic Technology Connector's -SPML design parameters section, Can we give multiple values in SPML Web Service Complex Data Type field?
    If not, how can i call methods directly instead of calling them through a values of the "name" attribute of the "complexType" element in SPML Web Service Complex Data Type?
    I need 'SPML Web Service Complex Data Type' to hold multiple values.And based on the request it has to initiate appropriate method of action.
    Presently i have three methods add,modify and delete which i am calling through a single value of the "name" attribute of the "complexType" element in SPML Web Service Complex Data Type.
    I want to replace this single value with multiple menthods , so that a direct interaction between the method,OIM and target can be established.
    Edited by: 821054 on 16/02/2011 04:23

    Thanks Robert.
    You'll need to create your own interface to the webapp database for those kind of data operations
    by this, are you speaking of the internal BC database which stores web app schema data? That would be great if it were possible to update that programmatically because I need to use the List (Checkbox List) field type (for the search functionality), but I need to supply the checkbox options from a web app rather than by manually updating the list entered in the Fields view of the web app settings (shown below).
    I'm curious if anyone else has tried this?
    Again, my reason for needing to use the List (Checkbox List) field type is that the page which processes searches knows to expect a comma separated list for this field type and then appears to be parsing out the individual values for searching out web app items with 1 or more matching values. You're right that text fields (string and multiline) just check for 'string contains' matches, and this would be ok if I was only ever needing to search just one value at a time. Here's an example of what I might do:
    Web App item field value (as recorded against the List (Checkbox List) field type:
    8294877,8294878
    Web App Search value (for this same field):
    8294879,8294877,8294885
    The search would return this web app item because the field contains 2 (1 or more) individual values even though they were entered into the search field in a different order. If this web app item were just a Text (string or multiline) field, the searched value is not a substring of the web app item's stored value, so it would not find a match. Hence the need to use Checkbox List field type.
    The web app will have thousands if not 10s of thousands of records, so dumping them all into one big array or object and searching on the front-end won't be practical (though it works great on smaller datasets).

Maybe you are looking for

  • ICloud help: universal apps wont automatically download to iphone 4s after downloading them on ipad and vis versa.

    Some apps that are universal will automatically download like, temple run, ibooks, bejeweled. But many other apps that are also universal like watchespn and pandora radio , wont automatically download to my ipad when i download them on my iphone and

  • ITunes for Windows 7 32-bit

    I just recently upgraded wo Windows 7 32-bit. I have been trying to re-download all of my previous programs, iTunes being one of them. When I run the setup.exe file downloaded from iTunes.com, I get an error message stating this program is not compat

  • Canon 495 printer scanner not working after upgrade to maverick

    I am sorry I upgraded to Maverick.. My Canon printer/scanner does not work.  I upgraded the drivers, etc. I get an error message and the icons drop out as soon as they come up to auto scan or photo.

  • Dependencies and start method

    Hi all, Am I right assuming that the execution of start method (start/exec) takes place after all dependencies of an instance have been resolved ? TIA oliver

  • Is Drobo REALLY compatible with Lion?

    I have a 2nd Gen Drobo (4 Bays with Firewire plug).  Ever since upgrading to Lion I have had numerous issues.  Super Duper (which was always very dependable) is not backing properly and my computer actually gets frozen quite often.  I can usually unf