Filtering by value

Hi,
I have a source message with that structure:
<item>
MATNR
DESCRIPTION
DATE
</item>
And I'm mapping to a target structure with the same fields.
But in my message mapping I want to ignore/delete the items where the value of field DATE is a DATE lower thatn system date.
For example if system date is 23/05/2008:
Source Message:
<item>
MATNR = '30'
DESCRIPTION = 'aaa'
DATE = '22/02/2008'
</item>
<item>
MATNR = '31'
DESCRIPTION = 'bbb'
DATE = '30/09/2008'
</item>
Target Message:
<item>
MATNR = '31'
DESCRIPTION = 'bbb'
DATE = '30/09/2008'
</item>

Hi Marshal
You can do it in normal mapping and you do not require to use any UDF.Always follow a simplest and elegant approch
Follow these steps
1) first you Take Current Date function from DATE category function
2)Then  Use Compare Date function from DATE category function
3) Compare current date and Date field using Comapre date function.
4) then use Equals function (for the string) from text second input for Equals function is "TRUE" or u201C1u201D
5) after that use IF function and give the above condition in IF part and assign current date
6) in the else part assign a constant , double click on constant and make  empty value to that constant.
By this way you can make comparision  and if the value comes true then it will assign current date else it will assign blank value
Hope this may solve your problem
Thanks
Sandeep
If helpful reward points

Similar Messages

  • Filtering  Unique values in the Hash table

    Hi Friends,
    Could you please tell me I want to Filtering the values in the Hash table.The Values are our own objects.
    E.G
    class Emp
    private String EmpID=null;
    public void setEmpId(String Id)
    EmpId=id;
    public void getEmpId()
    return this.EmpId;
    public static void main(String[] args)
    Hashtable hastab=new Hashtable();
    Emp e1=new Emp();
    e1.setEmpId("A");
    Emp e2=new Emp();
    e2.setEmpId("B");
    Emp e3=new Emp();
    e3.setEmpId("A");
    Emp e4=new Emp();
    e4.setEmpId("C");
    Emp e5=new Emp();
    e5.setEmpId("A");
    hastab.put("1",e1);
    hastab.put("2",e2);
    hastab.put("3",e3);
    hastab.put("4",e4);
    hastab.put("5",e5);
    I want to filter the duplicate values in the Hashtable.
    Thanks in Advance
    Rajesh Kannan

    Could you please tell me how i will Filter duplicate
    valus inside the objectI'm sorry, but I can't read the future.

  • Unable to burn cds. Have run diognostics. i tunes not running in safe mode. invalid lower filters registry value. Failed while scanning for CD/DVD drives, error 2500. Please help.

    Unable to burn CDs using i tunes. Have run diognostics.    Summary:-   i tunes not running in safe mode.
                                                                                                                                        Invalid lower filters registry value.
                                                                                                                                        Failed while scanning for CD/DVD drives, error 2500
    Please help.

    That's why you want to make a backup of the registry. If you didn't make a backup, use MS system restore to go back. The only values you should remove are UpperFilter or LowerFilter - one or both may be in there and can be removed. If neither value exists, then that is probably why you can't burn and Windows is not recognizing your drive as a writable drive.
    ... an HP employee expressing his own opinion.
    Please post rather than send me a Message. It's good for the community and I might not be able to get back quickly. - Thank you.

  • Filter on attribute of 0MATERIAL filters charac. values without master data

    Hi SAP-Gurus,
    I've a problem while executing a query (this query is based on a MultiProvider).
    I got the message "Filter on attribute of 0MATERIAL filters charac. values without master data" and I don't know why.
    When I don't use the filter on the navigation attribute, the query can be executed without any errors, bute when I set the filter, the warning message comes again.
    Thank you all,
    Clemens

    Dear all SAP Gurus,
    we've solved this problem and this is the solution:
    The warning is triggered by the method CL_RSDRV_ODS_QUERY-PROCESS_SFC_WITH_ATR when the BExFlag of the InfoProvider is not set. Using DSOs for direct update there is no change to change the BExFlag. As a result queries based on a DSO for direct update always throw the above mentioned warning when filter-characteristics are attributes.
    Regards, Clemens

  • Result of the query is not filtered as value given in Select Option variabl

    Hello ,
    A Select option Variable is created on Navigational Attribute( ZINV_PROG) of 0WBS_ELEMT.
    The Compound Key for object ZINV_PROG(Investment program) is APPR_YEAR( Approval Year)
    This ZINV_PROG object does not bear Master data.
    The values in the field get populated as you load Master data of 0WBS_ELEMT.
    The values for this objects is as shown below:
    APPR_YEAR ZINVPROG
    2005 ESCCCAPS
    2007 ESCCCAPS
    2008 FIRE
    2006 CAPITAL
    A select option variable is craeted on this Navigational attribute.
    When you execute the query , On the selection screen of the query..
    If you provide i/p for Investment programm field as 2007 ESCCCAPS, the data should ideally be filtered for this values only.
    But the result of the query shows data for both values 2005 ESCCCAPS and as well as for 2007ESCCCAPS.
    Let me know how to sort this issue.
    Points will be assigned for the correct and helpfull answere.
    Thanks,

    Thanks Srini for your prompt explanation.
    My Question is if Approval year is a compounded key of ZINV_PROG object why data would not get filter out directly.
    I mean on the screen for this particualr variable i take help - F4 to see values there you are able to see all the values of Investment programm along with the apprroval year.
    If i select value as 2005 ESCCCAPS from the help F4 screen then ideally data should be fileterd out for this particular value. But it is not happening so.
    Is that so in Query desgining that if you creating a variable on Nav Attribute, and that particular Nav attribute has a compound key then if you want to filter out the data for this Nav attribute correctly you would also require to create a variable for Compound key also.
    Please let me know
    Thanks

  • Report Builder 2.0 - Filtering multiple values with LIKE command

    Hi,
    I'm trying to use multiple values for a LIKE command in the Tablix Properties-Filters area. I thought this would be easy, and it may yet prove to be easy yet I'm banging my head against the wall at the moment.
    I have created a new filter with:
    Expression: Campaign
    Operator: Like
    Value: 02A*
    So, I only want the Campaign codes returned that start with 02A. Now, this on it own works fine, the issue begins when I want to add in the Campaigns beginning with 02K. I have tried adding a separate new filter underneath the first as well as using the
    OR command, yet, nothing is working correctly. When adding a separate filter it appears to work as an AND in conjunction with my first filter for 02A, but needs to work independently as an OR.
    Any help much appreciated.
    Mike

    Hi Mike,
    Based on my research, this should be a product issue in Report Builder 2.0. In your scenario, you should use “true” (without the quotes) to replace “True”. While changing True to true cannot work via UI since the UI will automatically change the true to
    True again. To work around this issue in Report Builder 2.0, you have to modify the True to true in the code view mode.
    After testing the issue in my environment again, I find another way to fix this issue. Please see:
    Expression: =(Fields!Campaign.Value like "02A*") OR (Fields!Campaign.Value like "02K*" )
    Type: Text or Boolean (Boolean type will automatically change to Text type)
    Operator: =
    Value: =true
    Btw, this issue has been fixed in Report Builder 3.0, the filter which you posted will be work great in Report Builder 3.0.
    If you have any other question, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Filtering multiple values in URL of a WAD

    Hello,
    I want to filter a WAD by the field 0FUNDS_CTR (Fund center).
    I'm adding this to the end of the WAD's URL and it works fine:
    &Filter_Iobjnm=0FUNDS_CTR&Filter_value=XXXX
    The problem is that I want to filter the field by multiple values (XXXX, YYYY, ZZZZ), that are different values, not a range or something like that.
    Is there a way to filter a list of values in the url?
    Thanks,
    Hadar

    Hi,
    For example , If there are two values to be filtered then use as
    &Filter_Iobjnm_1=0FUNDS_CTR&Filter_value_1=XXXX&&Filter_Iobjnm_2=0FUNDS_CTR&Filter_value_2=YYYY
    The index can grow in size and the BW server will recognize the parameters for filtering.
    Thanks
    Sundar

  • Filtering BPartner values

    Hi gurus,
    I have a business partner characteristic, so in my query  have to display only those filter  BP values which are negative.
    precisely query should display  only all negative values for BP.
    please help me , urgent requirement.
    max points will be awarded.
    regards,
    axel

    hi bhanu,
    BP values based on Amount in Local Currency which are negative should be filtered .
    i.e Accounts recieveble AR
    Summarize the line items for business partner and show them in the descending order, if the summarized amount is negative.
    hope I  am clear now.
    regards,
    axel
    Message was edited by: axel hunger

  • Filtering of values from a specific field

    Hi Everybody
    We have a requirement where a column called "Role" will have a both numberic and character values in it.
    Ex: 01 , 02 , .99 , .98 , 101 , PRM , PRS , EOS , PMS etc.
    Now the user doesnt want any of these numeric values to appear in prompts where user wants to select the values while running it in a dashboard.
    How can i restrict numeric values appearing for the user , so that they can only be able to see these characters instead of numeric values?
    Please help me on this as this is a bit critical requirement for us to deliver.
    Thanks a lot for your time on this in advance.
    Regds
    Mano

    Hi Mano,
    Within the dashboard prompt, set the SQL statement to be something like the following...
    SELECT *<your role column>* FROM *<your subject area>*
    WHERE *<your role column>* BETWEEN 'A' and 'Z'
    JB

  • Filtering column values in sql loader control file

    Hi all,
    i have a file that contains data such as
    111 Test ####### #testme juio# ###
    as you can see, the data is fix length and separate by spaces
    some field will have value such as ### and some column will contain alpha numeric with some # such as juio#
    i am trying to write a ctl file that read the data using position. ex position 1-3 will get 111 and 4-8 for example gets Test and so on.
    what i am trying to do is when a column value contain all # then i want to set to null. if a value contain alpha-numeric and # then load that value
    ex. ####### will translate to null. #testme will be load it as it is since it contain alphanumeric
    can someone help me write a ctl file that read the field by position and apply null to value that contain all #. again, if a field contain # and alphanumeric such as juio#, then that value should be loaded as is. it is only when the value contain all # it should be set to null
    Th

    You do it without it constant
    --sample data file
    1,2,,
    3,4,,
    LOAD DATA
    INFILE 'D:\d.csv'
    INTO TABLE ABC
    FIELDS TERMINATED BY ","
    ( A,
      B,
      C sysdate,
      D "USER"
    )Edited by: J99 on Jul 23, 2009 12:14 PM
    OR use to avoid extra ',' in datafile.
    --sample data file
    1,2
    3,4
    LOAD DATA
    INFILE 'D:\d.csv'
    INTO TABLE ABC
    FIELDS TERMINATED BY "," TRAILING NULLCOLS
    ( A,
      B,
      C sysdate,
      D "USER"
    )

  • Filtering domain value ranges

    Is it possible to filter domain value ranges when displaying a dropdown listbox in a table control according to the value of another field?
    For instance,
    - I have an ITAB with the fields FIELD1 and FIELD2 and a table control TABCON connected to it.
    - FIELD1 is an instance of the domain ZDOMAIN1 and FIELD2 is an instance of the domain ZDOMAIN2.
    - ZDOMAIN1 has the value range X, Y.
    - ZDOMAIN2 has the value range A, B, C, D.
    The value of FIELD1 will be already set and not changeable at this point, as for the drop-down list for FIELD2, I want it to include
    - only A and B if the value of FIELD2 is X for that entry
    - only C and D if the value of FIELD2 is Y for that entry
    I hope I've been able to explain my problem here.

    yes it is possible
    in process before output, you should build the value list dynamically and call function module VRM_SET_VALUES to update it on screen

  • Filtering unique values in dataset

    Hi, I have nice little dataset here, populated from xml. It
    contains articles, categories.....
    What I need is to initialize my custom menu class with unique
    values from categories column. So how do I query my dataset to
    return me only unique categories?
    I could do it in my xml parser (extract uniques in array),
    but that would be poor design.
    So please help! Need those uniques out of dataset fast!

    Could you please tell me how i will Filter duplicate
    valus inside the objectI'm sorry, but I can't read the future.

  • Filtered cell values copy and past procedure in excel 2007

    Dear All,
    Please help me regarding the title as i need to copy many filters item to get the sum.
    MS USER

    I don't think there is an easy way to import Excel data into a PDF form.  The only possible way I can think of is by using a JavaScript.

  • Filtering Prompt Values

    Hi,
    I have a Year Prompt which shows values from 2000 to 2017 in its dropdown. Can I filter the values in the prompt's dropdown so that it shows from 2010 till Current Year + 1 i.e. 2014 only?

    Use sql query something like below for 'SQL Results' at Show in the prompt
    Select year from SubjectArea where year<=year(Current_year)
    this should restrict as needed.
    If helps mark
    Edited by: Srini VEERAVALLI on Mar 4, 2013 10:26 AM

  • System Error cming while filtering the value

    Hi Bw Expert,
    I am facing one problem while doing the filter on a characterisitc in report.I am getting short dump on that.
    Wheras when i am doing drill down on the characteristic then i am able to do the filter.
    OPls help me.

    Revab,
    you mean to say that when you filter on a characteristic on BeX , the session is terminated ?
    Please send us the short text of the dump message , unless the dump reason is known , we would not know what it is that is causing the same.
    Arun

Maybe you are looking for