Need to compare 2 fields

I have a table in which i need to compare 2 different fields for the same
record. I only need Kodo to retrieve the row if the 2 fields are not equal.
I have tried using a few filter string.
1) fieldA != fieldB
This does not work.
Can anybody help?
Thanks in advance!

Teo Seng Guan-
I think what Steve meant is that he wanted you to enable verbose logging
(with the "kodo.Log: DefaultLevel=TRACE" property) and let us know if
the SQL that Kodo generates for that query looks correct.
I just ran a quick test, and the filter "fieldA != fieldB" worked as
expected for me. Are the fields of the same type?
Teo Seng Guan, Eric wrote:
Ya, I think sql might be easily to use in this case. But was wondering
whether kodo can still be used in this kind of cases..
Thanks!
Stephen Kim wrote:
Are you seeing SQL appropriate to this filter?
Teo Seng Guan, Eric wrote:
I have a table in which i need to compare 2 different fields for the same
record. I only need Kodo to retrieve the row if the 2 fields are not equal.
I have tried using a few filter string.
1) fieldA != fieldB
This does not work.
Can anybody help?
Thanks in advance!
Steve Kim
[email protected]
SolarMetric Inc.
http://www.solarmetric.com
Marc Prud'hommeaux
SolarMetric Inc.

Similar Messages

  • Need to compare two fields and populate the other fields.

    Hi All,
    I have scenario like this.
    DATA: text1(150) type C
    VALUE 'Step: SHORT DUMP; Scenario: PRE; Date :09.07.2007. Time :13:08:33.'.
    DATA: text2(150) TYPE C
          VALUE 'Step: &; Scenario: &; &',
    DATA: text_A(150) TYPE C,
              text_B(150) TYPE C,
               text_C(150) TYPE C.
    Now I need to compare text1 and text2 and populate text_A, text_B and text_C as follows.
    text_A = SHORT DUMP
    text_B = PRE
    text_C = Date :09.07.2007. Time :13:08:33.
    Basically I need to fill text_A, text_A and text_A with the values in text1 which are replaced by '&'.
    Can anyone suggest me a code snippet to do it?
    Thanks in advance.
    Regards
    Ankit

    Sorry for slow response - I'm in a different timezone I think... Well it's not a short algorithm, but you could try something like the following (there's probably a sweeter algorithm, but this is what occured to me overnight)... I realise that it's not foolproof as you could have words substituted in for the "&" that also appear in the original message text and that would skew the results...
    Jonathan
    report zlocal_jc_get_msgvars.
    types:
      gty_char150(150)      type c.
    parameters:
      p_text_1              type gty_char150 lower case,
      p_text_2              type gty_char150 lower case.
    initialization.
      perform initialization.
    start-of-selection.
      perform extract_msgv.
    *&      Form  initialization
    form initialization.
    *" Default screen variables
      concatenate
        'Step: SHORT DUMP; Scenario: PRE;'
        'Date :09.07.2007. Time :13:08:33.'
        into p_text_1 separated by space.
      p_text_2 = 'Step: &; Scenario: &; &'.
    endform.                    "initialization
    *&      Form  extract_msgv
    form extract_msgv.
    *" Work out the values that have been substituted
    *" into p_text2 to make p_text1
      data:
        l_text_a            type gty_char150,
        l_text_b            type gty_char150,
        l_text_c            type gty_char150,
        l_text_d            type gty_char150,
        l_tabix_1           type i,
        l_tabix_2           type i,
        l_word_1            type gty_char150,
        lt_word_1           type gty_char150 occurs 10,
        l_word_2            type gty_char150,
        lt_word_2           type gty_char150 occurs 10,
        l_result            type gty_char150,
        l_tabix             type sy-tabix,
        l_tabix_next        type sy-tabix,
        l_tabix_from        type sy-tabix,
        l_tabix_to          type sy-tabix,
        lt_tabix            type sy-tabix occurs 4,
        lt_result           type gty_char150 occurs 10.
    *" Break the strings into words
      split p_text_1 at space into table lt_word_1.
      split p_text_2 at space into table lt_word_2.
      format reset.
      format color col_total.
      write: / p_text_1(80).
      write: / p_text_2(80).
      format reset.
    *" Look at where the words in the shorter string appear in the longer
      loop at lt_word_2 into l_word_2.
        add 1 to l_tabix_2.
        write: / 'P_TEXT_2, Word', l_tabix_2, l_word_2.
        if l_word_2+0(1) = '&'.  "placemarker
          continue.
        endif.
    *" examine the expanded version
        read table lt_word_1 into l_word_1
          with key = l_word_2.
        if not sy-subrc is initial.
          write: /
            'ERROR: Word not found in expanded version' color col_negative.
          continue.
        endif.
        l_tabix_1 = sy-tabix. "Where we found word from short msg
        append l_tabix_1 to lt_tabix.
      endloop.
    *" add pointer to end of list of words too
      describe table lt_word_1 lines l_tabix_1.
      add 1 to l_tabix_1. "because we subtract 1 below...
      append l_tabix_1 to lt_tabix.
      loop at lt_tabix into l_tabix_from.
        l_tabix = sy-tabix.
        write: / l_tabix_from.
    *" get the range of words we want by getting next tabix row
    *" and subtracting 1
        l_tabix_next = l_tabix.
        add 1 to l_tabix_next.
        read table lt_tabix into l_tabix_to index l_tabix_next.
        if not sy-subrc is initial. "no more words...
          exit.
        endif.
        add      1 to   l_tabix_from.
        subtract 1 from l_tabix_to.
        loop at lt_word_1 into l_word_1
          from l_tabix_from to l_tabix_to.
          write: / l_word_1 color col_positive.
    * Push into text_A, text_B, text_C, text_D
          case l_tabix.
            when 1.
              concatenate l_text_A l_word_1 into l_text_a
                separated by space.
            when 2.
              concatenate l_text_b l_word_1 into l_text_b
                separated by space.
            when 3.
              concatenate l_text_c l_word_1 into l_text_c
                separated by space.
            when 4.
              concatenate l_text_d l_word_1 into l_text_d
                separated by space.
          endcase.
        endloop.
      endloop.
      uline.
      format reset.
      format color col_group.
      write: / 'TEXT_A', l_text_a(80).
      write: / 'TEXT_B', l_text_b(80).
      write: / 'TEXT_C', l_text_c(80).
      write: / 'TEXT_D', l_text_d(80).
      format reset.
    endform.                    "extract_msgv

  • Compare fields in collection model to display which fields differ

    Hi all
    I have a previous post, which I may not have clearly enough stated my objective, and hence I feel as I may have been given an incorrect directive.
    Anyway, I aim to be able to compare fields in collection model to display which fields differ between records. Ie, in my collection model, the SQL query may return 3 records. I want to be able to compare field A (rowindex 1) to field A (rowindex 2). I want to do this, so that I can use some EL or other method to change the text color presented to the user.
    The problem here is that the SQL query has over 100 fields, so I definitely need a generic / reusable / programmatic way of doing this.
    My initial approach was to create a bean that referenced values in the current and previous record set / iterator. Really, I am looking for a validation of my approach or any other alternatives.
    My last resort will be to modify the SQL query, and duplicate each column with a 'changed flag'.
    Thanks in advance,
    Simo

    Sure,
    you should create a transient attribute in your VO and in method getters and setters in the view row class implement your bussiness logic. There are several posts in this forum about this subject. For example, how to create a transient attribute in a VO in r12
    Regards,

  • Need one more field based on comparision of other fields

    Report Builder 6.0.8.11.3
    ORACLE Server Release 8.0.6.0.0
    Oracle Procedure Builder 6.0.8.11.0
    Oracle ORACLE PL/SQL V8.0.6.0.0 - Production
    Oracle CORE Version 4.0.6.0.0 - Production
    Oracle Tools Integration Services 6.0.8.10.2
    Oracle Tools Common Area 6.0.5.32.1
    Oracle Toolkit 2 for Windows 32-bit platforms 6.0.5.35.0
    Resource Object Store 6.0.5.0.1
    Oracle Help 6.0.5.35.0
    Oracle Sqlmgr 6.0.8.11.3
    Oracle Query Builder 6.0.7.0.0 - Production
    PL/SQL Editor (c) WinMain Software (www.winmain.com), v1.0 (Production)
    Oracle ZRC 6.0.8.11.3
    Oracle Express 6.0.8.3.5
    Oracle XML Parser     1.0.2.1.0     Production
    Oracle Virtual Graphics System 6.0.5.35.0
    Oracle Image 6.0.5.34.0
    Oracle Multimedia Widget 6.0.5.34.0
    Oracle Tools GUI Utilities 6.0.5.35.0
    Iam having report layout as below
    -- M_6
       -- M_10
          -- B_13
          -- F_94
       -- M_FOR_REP1
          -- R_SALESMAN
             -- M_39
                -- B_74
                -- F_113
             -- M_7
                -- B_33
                -- F_2
             -- M_CUSTOMER
                -- R_CUSTOMER
                   -- F_98
                   -- M_GNAME
                      -- R_5
                         -- M_12
                            -- F_41Above is my full layout of my report how it look like
    (B_33) Sales Men : F_2
    F_2 lists out the all the salesmen.(david, george .... so on)
    F_98 Lists out all the categories of products (Furniture , Automobiles .... so on)
    F_41 Lists out amount of particular category
    F_113 lists out the sum of F_41.
    Parameters that i pass is :
    From Date : 01-AUG-11
    To Date : 31-AUG-11
    Company Code : 110
    Orgn Name : Cytrex OU
    Sales Type :
    Salesmen From : DAVID FOO
    Salesmen To : DAVID FOO
    Customer From :
    Customer To :
    Year From Date : 01-JUN-11
    Year To Date : 31-AUG-11
    Report Detail : Yes
    And the output for my report is
    Item Type                      ProductFamily                  Quantity            Sales
    (MYR)
    Sales Men : DAVID FOO
    01FN
    01FN
    FNDM
    FNUM
    NEW CASA [BROWN (CS5839)]
    CELLINI LEATHER [BEIGE FL35A]
    CELLINI LEATHER [BLACK FL 10B]
    21,585.50i need one more field and the result should like to compare F_2, F-98, F_41
    For every salesman(F-2) there will be different category (F_98), i need to add the amount (F_41) for all the same category.
    like
    Customer :  David
             Sales men :     Thomas
    Furniture                100
    Automotives               50
    Textiles                  20
    Mobiles                   10
             Sales men :    Daniel
    Furniture                 30
    Textiles                  10
    Ship                      20
    Customer : George
             Sales men :      Thomas
    Furniture                 20
    Mobiles                   50
             Sales men :    Daniel
    Furniture                 10
    Mobiles                   20
    {code }
    result Salesmen : Thomas Daniel
    Furniture 120 40
    Automotives 50
    Textiles 20 10
    Mobiles 60 20
    Ship 20
    means all the based on the category for each salesman for different customers should be added.Please explain me how to place the extra field and write the logic for that. i am trying for this from past one month nobody is giving proper feedback, if you want to know anything more regarding this let me know i will provide you with the full fledge information.
    Edited by: user9093700 on Mar 12, 2012 1:08 AM

    your break is nt the better for this
    i think you can create a temporary table
    the fields salesman category and quantity
    insert and update for each record with a formula or create a new sql query and maybe use a matrix to show as you want

  • OB28 Validation rule.. need to compare with other environment

    Hi All,
    I need to compare the validation rule (OB28)  present in the Development environment with the Production Environment. So is there any way out where in we could export the validation rule into an excel file and then do a comparision.?
    Thanks a lot in advance,
    Regards,
    Shailendra.

    I think you need to use Ajax.
    It is very simple. write a function in onchange event of the input field
    <input type="text" name="appdt" size="10" maxlength="20" id="dateField" class="dateparse">
    It will invoke a simple javacript function say
    <input type="text" name="appdt" size="10" maxlength="20" id="dateField" class="dateparse" onchange="fetchRecordsDatewise(this.value);">
    in the function definition of fetchRecordsDatewise(dateval)
    pass dateval to another recordFetch.jsp page with value dateval.
    In the recordFetch.jsp using request.getParameter() get the dateval's value nad query the db.
    now there print the matching db record.
    again you come to the onreadystatechange event handling javascript function that will process the response,
    maybe just to show the datewise record inside a div with div_show, with the following line
    document.getElementById("div_show").innerHTML=resp; //here resp is the response string from recordFetch.jsp
    if you don't know Ajax then, you can see simple ajax example with jsp.
    Hope these solves your problem.

  • SSRS Matrix report. Variance expression by Month. Need to compare month from prior year to current month of current year VS2010

    Please help.  I have a matrix report.  In the report I have row group  PO Type.  One the Column groups I have a parent group by Fiscal Year, and then a child group by Month.  When I run the report, I get two years of data back broken
    out by month.  Please see below.
    Now here is where I am getting stuck.  I need to take the variance between the current month of the current year, from the same month of the prior year.  So I need to show the difference between Oct , 2014 from Oct, 2013. November, 2014 from November
    2013... etc. etc.
    In the example below, how do I create a column or row showing the variance for Contracts for October 2014.  I need to take the contracts for October 2014 which is 3 and subtract that from October 2013 which is 8.  Any suggestions? How do I do that
    for each month?  Then I need to do it for the quarter... then the year?  But I'll be happy if I can just get the month working first.
    Any help will be appreciated. 
    here is what my rdl file looks like.
    Here is what my report looks like when I render it.

    Hi Adrian_s2012,
    According to your description, you want to compare values for the month of current year with the month of prior year and get the variance. Right?
    In Reporting Services, we don't have any function to get this "Year to Year" Growth. In this scenario, if you data source is a cube, we suggest you use Analysis Services to achieve your requirement. If this data source is just from database, it will be hardly
    to calculate the variance because we need to compare the values within every two different column group and matrix generate adjacent columns one by one. Even we make it by using custom, every time executing the long code when generating result
    in a cell will reduce a lot of performance, we really don't suggest to do that in SSRS. Here is a thread with much easier requirement, please take a reference of that:
    http://social.msdn.microsoft.com/Forums/office/en-US/842e2dcb-d949-4297-9d91-eac989692cb5/difference-between-the-grouped-column?forum=sqlreportingservices
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Comparing fields from multiple entities in the same report (report builder 1.0)

    Created a model that contains 2 entities. I open that model in report builder 1.0.  When I drag a field from one of the entities into the design area, i can no longer see the other entity or use any of the fields from that other entity. 
    I need to use fields from both entities in the same report (join tables).  In management studio i would simply write a query and join tables but i cannot figure out how to do this in report builder.  Once i select a field from one entity
    how do i select fields from more than one entity and drag them into the same report.

    Would it be possible for you to send me instructions for this? I am not that familiar with SQL coding but I can definitely figure it out. I have been wanting to get information on reports from multiple entities for a very long time! The only way I can
    currently do it is have our document management software people write the report for me for quite a large fee. I would much rather do this myself. Right now I can select a few fields from one entity (the main one), some from a second entity under that one,
    but I cannot add any fields from a third entity! Quite annoying and hindering! Thank you :)

  • On Pages, let's say you have two similar documents, but you need to compare the two to see the differences.  Is there a way to do that?

    On Pages, let's say you have two similar documents. Two versions of the same document, but not merged in Cloud and saved as two separate files. B ut you need to compare the two to see the differences, some things on one, but not in the other.  In Word, they would merge the two and differences would be highlighted in red.  Is there a way to do something like that?

    Not actually in Pages, but there is third party software that purports to do this, google around.
    Peter

  • Need to compare html text area values by using java script

    I have one html text area in my JSP file. when i click on that text area, a pop-up will come, in that pop-up i have list of items. So after selecting a item from that pop-up list, need to click okay. so that text area will update with the selected value.
    In this case, i need to compare the first text area value and updated text area value. How can i do that in Java Script.

    I suggest you look for a Javascript forum to ask questions about Javascript. This is a Java forum.

  • I need to add fields in additional fields B the sales order line item

    i  need to add fields in additional fields B beside the field (icon_val_quantity_ structure) in the sales order line item, How to achicve this? please help me..

    Please fined the below solution for achieving your requirement.
    1. Add new filed "B" in table VBAP.
      a) T.code  SE11 --> Enter structure name VBAP --> display
      b) Goto --> Append Structure --> Enter Structure name and new field "B"
    2. request your basis team and take the access key for modification of stabdard program SAPMV45A & Screen: 8459
       a) After receiving access key for standard program then got o SE51 --> enter program name  SAPMV45A & Screen: 8459
       b) click change Button
       c) click layout button
       d) add new field "B" below of the screen (F6 -> enter table name : VBAP --> get from dictionary --> selet new field and past in screen )
    3) write below code in flow logic
    PROCESS BEFORE OUTPUT.
                               Verarbeitung vor der Ausgabe
      MODULE ZZPB_INITIALIZE_8459.
      MODULE ZZPB_OUTPUT_8459.
    PROCESS AFTER INPUT.
      CHAIN.
        FIELD VBAP-New field name "B".
        FIELD ZVC_SALES_EXPORT-ZZAPLHENKO.
      ENDCHAIN.
      MODULE ZZPA_OUTPUT_8459.
    4. functin Module code
    module ZZPB_OUTPUT_8459 output.
      Data: l_v_actve type ale_active,
            l_v_ttyp  type c.
      Data: l_v_tragr type tragr.
    l_v_ttyp = t180-trtyp.
      if l_v_actve is initial.
        l_v_ttyp = 'A'.
      endif.
      LOOP AT SCREEN.
        CASE l_v_ttyp.
          WHEN 'A' OR 'C'.
            SCREEN-INPUT = 0.
        ENDCASE.
      ENDLOOP.

  • Need to Add field EKET-EINDT and EKET-SLFDT to ME2M Report output in ALV

    Hi All,
    I need to add fields EKET-EINDT and EKET-SLFDT to the output of program ME2M Transaction.
    I have appended the structure MEREP_OUTTAB_PURCHDOC with these fields. and it is coming in the ALV output field catalog.
    I need these fields output only for ALV display only.
    Please let me know which enhancement i need to write code to enhance the output with these filed values added to the ALV internal table
    Thanks in Advance
    Arun

    Hi All,
    I am able to get the field EINDT and SLFDT into the structure using Append structure and is also getting displayed in the output in ALV.
    But i need to know how to add code for filling these fields and passing into ALV. I need to know the Enhancement spot.
    Please let me know how to achieve this scenario
    Thanks
    Arun

  • Need to Add Field Name to the Downloaded XLS file

    Im using the function SAP_CONVERT_TO_TXT_FORMAT
    and downloading the contents by sending them as attachements in email.
    I need to add field names(column name) to excel fields.
    So that when fields are displayed in excel file they are displayed by their column names..
    How do I do this.? Any ideas.
    Answers will be rewarded with points..

    Hi
    You can manually insert the column names as the first row in your internal table to have them in .xls file as headers.
    Regards,
    Raj

  • I have a fillable form that's already been made. I need to edit fields by moving them and I need to add new fields. How do I do that?

    I have a form that was made by someone else. I need to move fields and add new fields in the same box. How do I do that?

    If the form was created in Acrobat and you have Acrobat, you should be able to edit the fields by selecting: Tools > Forms > Edit
    This is for Acrobat 11. If the PDF has security restrictions that prevent editing or was created with LiveCycle Designer, you won't be able to edit it in Acrobat. If security was applied, you'll need to know the password in order to remove it to allow editing.

  • Need table and field

    Hi experts,
    These are the table and field i want get it, but there's no data appear when i try it in my sapscript form.
    ALV_SAPLQMAL_001
    CHANGED_DATE
    ALV_SAPLQMAL_001
    CHANGED_TIME
    ALV_SAPLQMAL_001
    CHANGED_BY
    ALV_SAPLQMAL_001
    FIELD_CONTENTS
    Please advise, i need alternative table-field name to retrieve data.
    Thanks in advance, I'll rewards marks ~

    Hi S.r.v.r.Kumar ,
    I can't get the correct table and field to display the data in my form (sapscripts)
    In t-code QM03 - Extras - Notification Documents - Action Log
    These are the data i want it to be at my form (sapscripts)
    http://img406.imageshack.us/img406/7774/q2yh3.jpg
    Any ideas to get the table and field for the data in the 3 column n row?
    Please kindly advice, thank you.
    Edited by: miLka Sasa on Jun 20, 2008 10:09 AM

  • New Tab in WBS Elements & need to pull fields from Std SAP Tab to the New

    Hi All,
    I would like to create a new TAB in WBS Element & I need to pull fields from Basic data tab,Origanization Tab,Control Tab & user Fields Tab  to the New Tab.
    Basically my clients wants to see all the fields (based on the requirement) in one TAB.So user will directly  go to the Custom Tab & enter the input data & save.
    So Kindly guide me how to proced.I tried WBS Layouts ,but am confused.
    Any ABAP work is required?or can we do it in PS Configuration itself?
    Thanks
    Suresh

    Configuration:
    Project System>Structures>Operative Structures>Work Breakdown Structure (WBS)>User Interface Settings>Layout of WBS Element Detail Screens>Define Layout of WBS Element
    Detail Screens
    Do do something as below:
    Project Profile:000CAP1
    Act Cat:*     
    Tab Page ID: TAB01     
    Tab page Title:Basic Data
    ICON_HEADER
    Details Screen 1: 2 (WBS Element Basic Data)
    Details Screen 1: 5 (WBS elements, organization)
    Details Screen 1: 8 (WBS Element: User Fields)
    Regards
    Sreenivas

Maybe you are looking for

  • How do I backup a large music library to two smaller drives?

    Does anyone know if it is possible to split a library in half, when backing up? I have an external 1000 gig lacie drive that is the home of my itunes media folder location. I also have two smaller lacie drives that put together could have enough spac

  • Control mac mini using medius tx1000 universal control

    I have a iMac 24, but I am interested in buying a mac mini to use in my home theatre using iPhoto & iTunes. Can the mac mini be controlled using the Medius tx 1000 or ant other universal remote?. Can the mini be turned remotely on and off?

  • No color on the Iphone screen

    Out of nowhere, my Iphone5 lost all of it's color on the screen. No color on the screen anywhere. Tried to restore the phone and checked to make sure the "Invert Colors" and "Grayscale" was not on. Anyone know what has caused this problem?

  • Converting String to XMLDataType

    As title, is there any way I can convert a String to XMLDataType? I tried to assign it and I tried to type-cast it but it wouldn't let me do either one. XMLDataType _XML; String _stringXML = "<?xml version='1.0' ?> <text> Hello </text>"; _XML = _stri

  • Authorizations for planning

    Hi, We are facing the following issue concerning authorizations for integrated planning. An employee 'X' should be authorized to change its own planning and display the planning of other employees. Furthermore the employee should see WBS elements 1 &