I would like to compare two field and then is it's true then the output will be the 2nd one

Hello All,
I am doing a mappong where i need to compare two field and then if there are equal the 2nd one should be the output and 2nd value will be using multiple segment.
It's for shipment.
Regards
Rituparna

Not sure if i understand correctly. But you are trying to compare one field with multiple occurrences of another field.
You can make use of the node function "Use One as Many" and repeat the first value as many times as the second value.
Please refer to below wiki.
Explain node functions - Process Integration - SCN Wiki

Similar Messages

  • I would like to completley delet firefox and reinstall but i canot thers alwase somthing left which continues the problem i have used firefox before with no problems

    i would like to completley delet firefox and reinstall but i canot thers alwase somthing left which continues the problem i have used firefox before with no problems edit

    You can remove the Firefox program folder if there are still files left in it after uninstalling.
    * http://kb.mozillazine.org/Uninstalling_Firefox

  • Compare two fields and populate a third

    I am trying to do the following:
    Filed A number of days leave left
    Field B Total number of days requested (some of other Fields)
    Field C = A - B
    Field D = Listed number of days unpaid to be taken
    If C < 0 then D = C
    I am using the following code
        // Get the field values, as numbers 
        var v1 = this.getField("leaveleft").value; 
        var v2 = this.getField("totaldaysrequested").value; 
        var v3 = this.getField("daysleft").value;
        var v4 = this.getField("unpaiddays").value;
        if (v2 < "0") v4 = v3; 
        unpaiddays.value = v4.value;
    This is not populating the field, what am i doing wrong?

    Assuming this is the calculation script for "unpaiddays", use this code instead of what you have now:
    var v1 = +this.getField("daysleft").value;
    event.value = (v1<0) ? v1 : "";

  • 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

  • I have two fields and I would like the 2nd field to display the word "Error" if the number is smalle

    I have two fields and I would like the 2nd field to display the word "Error" if the number is smaller than the number in field 1.
    can any one help?

    The code for the field? Sure, it's simple.
    You can use something like this as its custom calculation code:
    var v1 = this.getField("Field 1").valueAsString;
    var v2 = this.getField("Field 2").valueAsString;
    if (v1 && v2 && Number(v2)<Number(v1)) event.value = "Error";
    else event.value = "";
    Edit: Fixed code

  • Is there is any  way to create a validator to compare two fields (like a pa

    Hi,
    Is there is any way to create a validator to compare two fields (like a password and a retype password ) ?
    please give me any suggestion or any example related this problem!!
    thanks,
    Praveen Soni

    Ugh, do you have taken over the LimitValidator and the JSF example (including the f:validateDoubleRange which is unnecessary in this case) literally without actually reading/interpreting/understanding it? No, then it is indeed not going to work. Basically you just need to define a validator in the one password field and pass the client ID of the another field as attribute along the one password field. In the validator you can retrieve the value of the another field by its client ID and finally just invoke String#equals() on the values of the both fields.

  • In Address Book, I would like to have a field "File As". So, l can list "Joe Smith", as "The Smith Family". I will use this when I print labels for Xmas cards and such. Thanks!

    In Address Book, I would like to have a field "File As". So, l can list "Joe Smith", as "The Smith Family". I will use this when I print labels for Xmas cards and such. Thanks!

    In Address Book, I would like to have a field "File As". So, l can list "Joe Smith", as "The Smith Family". I will use this when I print labels for Xmas cards and such. Thanks!

  • I would like to import two different cf cards from two different cameras into the same project/folder and have them be in order of the times they were taken, is there a trick?

    I would like to import two different cf cards from two different cameras into the same project/folder and have them be in the order of the times they were taken, any ideas on how to do this?

    Just import them normally and sort the project by date. They will fall into place. If you tried this and it isn;t happening then make sure the data and times on the two cameras are identical and make sure you are sorting by date and time and nothing else.

  • Compare two columns and match ALL recurring values, not just the first instance

    Hi everybody...
    I was looking for a way to compare values in two columns, identifying every duplicate value instance on a third column.
    Searching around the forums, I found a solution, albeit a partial one; I am using this formula: =IFERROR("Duplicate in row "&MATCH($A,$B,0),"") along column C, to compare values between columns A and B. When applied, the formula will render the first instance where there is a duplicate; unfortunately MATCH will only register the first instance of the duplicated values.
    For example:
    The first value on column A is 'Apple'. On column B there are three instances for the value 'Apple', the formula identifies the first of these values, but not the remaining two.
    I am not an advanced Numbers or Excel user, and the answer to this problem eludes me. I am attempting to compare columns that have no less than 1000 rows each, so you can imagine how, finding a solution to my problem would be really great.
    Thanks in advance,
    Pablo

    Unfortunately I can't see your screenshot, but supposing you have a table like this:
    Col1
    Col2
    1
    3
    Dupe
    2
    4
    Dupe
    3
    5
    Dupe
    4
    6
    5
    7
    Then here is one way to flag the duplicates.
    The formula in C2, copied down, is:
    =IF(COUNTIF($A,$B2)≥1,"Dupe","")
    Then filter on column C for 'Dupe', and copy the values in column B to wherever you need them.
    SG

  • I would like to zip two .Txt files in java

    hi all,
    i would like to zip two temporaray files(.Txt) in java

    Do you want to write a part of it yourself or do you want us to prepare you a complete solution? I provided you with a link to Java's zipping tutorial. If you took the effort to read it, you'll know there is an example zip.java.
    You can put the initialisation in your main, take what's in the for loop, put it into a function. I assume you can write a program that takes 2 command line parameters, and pass those params to your zip function and you've got it... That's how far I'll go for your solution!

  • Compare two tables and log the difference

    Hi,
    I want to compare two tables and log the difference in new table with the fields as (old value,new value, column name). The column name should be the changes value column

    Can you show an example?
    SELECT Foo.*, Bar.*
       FROM Foo
            FULL OUTER JOIN
            Bar
            ON Foo.c1 = Bar.c1
               AND Foo.c2 = Bar.c2
               AND Foo.cn = Bar.cn
     WHERE Foo.key IS NULL 
        OR Bar.key IS NULL; 
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • I would like to make two separate ca

    I would like to make two separate Calendars in iCalendar.  Tried following directions on "help" but what I get is two calendars that are linked and the same.  How do I get two completely, independent calendars?  Thanks

    I have the same question.  Does anyone have a solution?

  • 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

  • How do I Average two fields and round down?

    I need to average two fields and round down to the nearest whole number. The two fields will always each have a value.
    If someone could help me out, I'd appreciate it.
    T.

    Assuming you want this to be a custom calcuation script for a field, it could look something like this:
    // Custom calculation script
    (function () {
        // Get the field values, as numbers
        var v1 = +getField("text1").value;
        var v2 = +getField("text2").value;
        // Set this field's value to the average, rounded down
        event.value = Math.floor((v1 + v2) / 2);
    More information on the Math.floor method can be found in any decent JavaScript reference.

  • My old mac screen broke down and I would like to transfer my photos and documents to my new mac. Is it possible to transfer it with the cable without fixing my screen?

    My old mac screen broke down and I would like to transfer my photos and documents to my new mac. Is it possible to transfer it with the cable without fixing my old mac screen? Please help!

    Sure! If the two Macs have Thunderbolt ports, attach a Thunderbolt cable between them. If they have FireWire, or if one has FireWire and one Thunderbolt, connect a FireWire cable (with a TB adaptor if necessary). Reboot the old Mac holding down the T key. Make sure it's connected to power. You'll now see its system drive appear on the desktop of the other Mac and you can use Migration Assistant to automatically transfer files, or drag them over manually.
    Matt

Maybe you are looking for

  • Advice on setting up a HTTP server for APEX

    Hi Experts, I'm very busy to setup an application in APEX, and we're about to deploy it on our production servers. Database side is fine, but I got some questions about the HTTP server. (I come from an engineering background, working with databases f

  • What should I do if whenever I open Itunes it freezes my whole computer and the mouse doesn't move?

    How can I prevent my mac book pro from freezing whenever I open Itunes. (Whenever I open Itunes my whole computer freezes and I can't move or do anything) What should I do??

  • EmailEventGenerator Document and attachment names

    Hi, I am using this method call to get the email attachment names from the EmailEventGeneratorDocument this.emailEventGeneratorDocument.getEmailEventGenerator().getAttachments() The method returns a string of comma delimited file names attached with

  • Weird Apple Universal Dock Problems

    I have had my Apple Universal Dock for about a year and a half.  I have many problems with it now.  I have an iPhone 3GS and I use my dock to charge it every night.  I have the apple remote (white). Problems: 1.Will not work with remote 2.Says iPhone

  • How to reconcile records with r/3

    Hi gurus, i did a data load into the data target and it was successful. the was comming from R/3. now my question is how do i reconcile the data in the data targets and r/3, i mean how do i know the number of records which are loaded into bw are the