Filter data using where statement : need to filter a variable if it starts

Hi,
in my loop statment , i am using a where condition.
a variable has numbers and characters , i want to filter the variable using where statement identifying if it is acharacter not to enter into the loop.
any suggestions . Thanks in advance.
regards,
Ry

Hi ,
try like this
data:l_file_data(20) type c,
oref   TYPE REF TO cx_root.
data: l_amount type p decimals 2.
l_file_data = '12A3'.
try.
l_amount = l_file_data.
catch cx_root into oref.
endtry.
if oref is not initial.
write: 'Miss Match'.
endif.
regards
Prabhu

Similar Messages

  • Filter Data using LDB PNP

    Hi,
    I'm looking to filter data in a report which uses LDB PNP.
    When i enter the 'start dates' and 'end dates' the values goes into PN-BEGDA and PN-ENDDA respectively.
    I want to know whether the GET PERNR statement will filter out the data based on 'start dates' and 'end dates'
    or do i have to loop at each infotype and manually filter out.
    varun

    >
    Rajesh Paruchuru wrote:
    > [Here is the answer from SAP|http://help.sap.com/saphelp_47x200/helpdata/en/4f/d527ba575e11d189270000e8322f96/content.htm]
    >
    >
    GET PERNR fills the internal tables of infotypes that are declared for
    >  each employee  using the INFOTYPES statement. The internal infotype table
    >  is filled with all records existing  between the lowest and highest
    >  system date. The internal table has the name Pnnnn,  where nnnn is the
    > infotype number
    >
    > - Rajesh.
    That means its useless to give a selection criteria on the selection screen.
    GET PERNR will get all records, means it will just filter the employee numbers nothing else, everything you will have to do manually by using loops.
    Varun

  • How to fetch negative sign data using select statement

    hi gurus,,
                  i hv  to fetch data which is negative in nature  using select statement i m using ppdit table and wrbtr field.(it contains both negative and positive data)....wat sud i add with select statement...plz help me..
    thnx in advance
    Message was edited by:

    HI,
               I think you can use LT or < 0.0 in the WHERE clause to get all the -ve values. Once you get them treat them as negative.
    Regards,
    Sesh

  • Filter data using choice filter in an infopath form

    Hi
    I have been trying to filter the values in an Infopath form using the choice filter, on a page in sharepoint 2013
    but full data of the list does not get displayed in the form exceot the first field.
    Please help how can i get data filtered data in the form according to the Account name i select in the filter.

    Hi,
    According to your description, the other field does not display data except the first field.
    Have you created rule for every field to set value based on the choice filter ?
    You need to set the condition based on the choice field and then set the datafield for control.
    Here is a detailed blog for your reference:
    http://blogs.msdn.com/b/infopath/archive/2010/05/06/sharepoint-list-data-connections-in-infopath-2010.aspx
    Best regards
    Patrick Liang
    TechNet Community Support

  • I am not able to fecth data using this statement

    Hi All,
    Iam getting problem when i was using select queiry based on vbak,vbap and konv tables.
    Error is i am not able to get  all condition types but i am getting only first record
    Example...
    number of the document condition which is KNUMV
    condition item number which is KPOSN
    condition type which is kshcl
    knumv              kposn             kshcl
    00000002          000100        zpro
    00000002          000100        zdsc
    00000002          000100        zima
    00000002          000100        zpak
    but iam getting only first fecord not getting all the records
    like
    000000002    000100    zpro
    code is ..........
    *select Sales Document: Header Data and Item Data from vbak and vbap
    select avbeln aerdat aernam aauart avkorg avtweg aspart akunnr avkbur avkgrp alifsk afaksk aaugru aknumv
           bposnr bmatnr bwerks blgort bkwmeng bpstyv babgru bbedae blprio bvstel bntgew bbrgew
           bvolum bfaksp bktgrm btaxm1 babfor bkalsm_k bmatkl bkondm bgsber bprctr
           into corresponding fields of table it_vbak
           from vbak as a inner join vbap as b on avbeln = bvbeln
           where a~vbeln in lr_vbeln and
                 a~vkorg in lr_vkorg and
                 a~vtweg in lr_vtweg and
                 a~spart in lr_spart and
                 b~werks in lr_plant and
                 a~auart in lr_auart and
                 a~erdat in lr_erdat.
    Move all the data to it_sorder
      IF sy-subrc = 0.
        LOOP AT it_vbak.
              MOVE-CORRESPONDING it_vbak TO it_sorder.
              APPEND it_sorder.
              CLEAR it_sorder.
        ENDLOOP.
      ENDIF.
    *select Conditions from konv
    IF NOT it_sorder[] IS INITIAL.
        SELECT knumv kposn STUNR KAPPL ZAEHK kschl kbetr KAWRT
               INTO CORRESPONDING FIELDS OF TABLE it_konv
               FROM konv FOR ALL ENTRIES IN it_sorder
               WHERE knumv = it_sorder-knumv and
                     kposn = it_sorder-posnr.
      ENDIF.
    Read Conditions  from it_konv move it to it_sorder
      sort it_konv by knumv .
       sort it_sorder by knumv .
        LOOP AT it_sorder.
        READ TABLE it_konv WITH KEY knumv = it_sorder-knumv
                                    kposn = it_sorder-POSNr binary search.
        IF sy-subrc = 0.
          it_sorder-Kposn = it_konv-kposn.
          it_sorder-STUNR = it_konv-STUNR.
          it_sorder-KAPPL = it_konv-KAPPL.
          it_sorder-ZAEHK = it_konv-ZAEHK.
          it_sorder-kschl = it_konv-kschl.
          it_sorder-kbetr = it_konv-kbetr.
          MODIFY it_sorder.
          CLEAR it_sorder.
        ENDIF.
        CLEAR it_konv.
      ENDLOOP.
    pls can you help me
    thanks
    mars

    I think the problem is here:
    sort it_konv by knumv .
    sort it_sorder by knumv .
    LOOP AT it_sorder.
    READ TABLE it_konv WITH KEY knumv = it_sorder-knumv
    kposn = it_sorder-POSNr binary search.
    There will be mulitple lines in it_konv with this key so it will only return the first. You need a second loop round it_konv eg:
    LOOP AT it_conv WHERE knumv = it_sorder-knumv and kposn = it_sorder-POSNr.
    * do stuff here
    ENDLOOP.
    Try that and see if it helps...
    Andy

  • How to validate date using case statement.

    I have date like 022212. I split month,date,year using STUFF Function. Now, i have to validate month in range 01-12 and date in range 01-31.  Can some one help me with the query.
    Thanks, Shyam Reddy.

    That is not  date; it is apparently a string (we have no DDL because you are so rude). Any competent SQL programmer will use DATE.   You want help with a query, but there is no query.  
    CAST ('20' + SUBSTRING (crap_string_date, 5,2)+'-' + SUBSTRING (crap_string_date, 1,2) + '-' +  SUBSTRING (crap_string_date, 3,2)  AS DATE) AS redddy_screwed_up_date 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • SSRS dataset filter expression using OR

    I have a dataset that I need to set a filter for. What I need the filter to do is check 3 different fields to see if either one of them are in a parameter. The parameter is multi-value. So, I have a parameter set to 1, 2, 3. I need the dataset to return
    records where either Field A, B, or C are IN 1, 2, 3.
    Anyone know how to do this? I tried to have the filter expression = Fields!A.Value or Fields!B.Value or Fields!C.Value then the dataset filter operator "IN" and the dataset filter value = Parameter, but I just get an error on the dataset filter
    (cannot evaluate filter expression error)

    Hello,
    Mulitple expressions added to SSRS dataset filter are evaluated as AND (Expr1 AND Expr1 AND Expr3). If you are looking for a OR like Expr1 Or Expr2 Or Expr3 then you can use this solution explained below.
    Dataset Query used for this test:
    select *
    from (values ('Row1',1,1,4),('Row2',2,1,3),('Row3',3,1,2),('Row4',3,2,2),('Row5',5,3,2),('Row6',5,6,7),('Row7',2,6,7)) x(DataRow,A,B,C)
    Report Parameter :
    Defined a multi select report parameter named "Parameter1" with string datatype and added values 1, 2, 3.
    Dataset Filter Expression:
    =Filter(Parameters!Parameter1.Value,CStr(Fields!A.Value)).Length + Filter(Parameters!Parameter1.Value,CStr(Fields!B.Value)).Length + Filter(Parameters!Parameter1.Value,CStr(Fields!C.Value)).Length
    The expression above uses the Filter function in SSRS to check if the field A\B\C has any match in the parameter1 mutli select parameter. If yes the length property will return a value > 0. Repeat the expression for all the other fields and add the Values
    for length property.
    Use > operator in the filter dialogue box
    and value as 0 as shown in the snapshot below.
    The output is shown below. Row 6 is missing as Field A, B or C doesnt have 1, 2,3 as values. If this is the output you are looking for this solution should work for you.
    --sIbu

  • IIR Filter without using a loopm t

    I'm trying to apply an IIR filter equation to a large array and for this reason I don't want to use a FOR loop - because it takes forever to get through the array. Is is possible to do this using array functions? I have done similar things for FIR filters but it's the use of previous output values that has me stumped.
    Can anybody help?
    Thanks,
    Ken

    Ken,
    There are two VIs that should be available to help with this.  Look for IIR Cascade Filter.vi and IIR Filter.vi.  Both implement the filter with the coefficients being inputs.  The difference is in the layout of the coefficients.  IIR Filter.vi uses direct form, IIR Cascade Filter.vi uses cascaded 2nd or 4th order stages.  The layout for both structures can be found in the online help.
    -Jim

  • How to parsing xml data in sql statement??

    Hi friends, I have a table which contain column as clob ,stores in xml format, for example my column contain xml data like this
    <Employees xmlns="http://TargetNamespace.com/read_emp">
       <C1>106</C1>
       <C2>Harish</C2>
       <C3>1998-05-12</C3>
       <C4>HR</C4>
       <C5>1600</C5>
       <C6>10</C6>
    </Employees>
      Then how to extract the data in above xml column data using SQL statement...

    Duplicate post
    How to parsing xml data in sql statement??

  • Can we change the system date using Sql

    can we change the system date using Sql statement..
    can anyone help
    Tariq.

    There is an initialization parameter called FIXED_DATE which lets you set a fixed sysdate for testing purposes, and you can alter that date using the ALTER SYSTEM command, but as implied by the name you are setting a data/time that doesn't change. Since the normal sysdate is derived from the O/S it cannot be altered through SQL

  • Where I need to buy Crystal Report Software.

    Hi,
               I am a SAP Business One Consultant, for my client i need buy the crystal reporter software. So Where i need to process this.

    Hello,
    You can start here by down loading the Trial version. You'll find links there also to purchase....
    Trial version: http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx
    Thank you
    Don

  • Using a Search Window to Filter Data In PowerPivot on Sharepoint?

    When viewing a PowerPivot workbook natively all is well. However when I save it to Sharepoint and view it via a browser, I find that the option to filter data by typing in a value is no longer present. (All there is is an extremely LONG list of values
    which must be scrolled through and checked.) Being able to type in a value to search on is rather crucial feature when one wants to filter on a row where there may be thousands (or more) distinct values. Using a slicer or the standard filter drop-down in this
    case is pretty unworkable! Is there no way around this?

    Hi Ed,  we have a workaround that one of my team members found.  
    Even though there doesn't appear to be a way to have a search window associated with a long filter list, it is possible to filter by column, by clicking on its respective drop-down to bring up a short-cut menu.  From there you can expand either the
    "Label Filters" or "Value Filters" sub-menu (depending on your data-type) and bring up, among other options,  the "Contains..." dialog box.  It's not as convenient but it does the job.
    Now we just need to check with our users that this is an acceptable solution.  Thanks.

  • How to determine # of recs in the data grid - with filter being used

    Say I'm looking at table or view that has 10,000 rows. I put a filter on the filter line such as state = 'WA'. Let's say the data grid (where I see the data clicking the 'data' button) now has 2,500 rows with the filter in effect.
    So, how do I tell how many rows are in the data grid now? I can see how to retrieve the total number of rows for the table or view, but how when a filter is in effect.
    Thanks.

    Okay thanks.
    Sure would have preferred to see (dare I say ... like TOAD) where you can just right click in the data grid and choose record count.
    But thanks - I'll use the COUNT method (till of course it's added 8-)
    Russ

  • How to filter tasks on the Creation date using the IWorklist API in Java

    Hi all,
    I'm currently developing a java gui application to display usertasks set by the BPM.
    I use the WorkList API to communicate with the TaskActionActionHandler.
    I only want the tasks that has a creation that is after a specified date. Therefore I add a filter. The code for retrieving the usertasks now becomes:
    Map filterMap = new HashMap();
    SimpleDateFormat d = new SimpleDateFormat("dd-mm-yyyy");
    Date date = d.parse((String) dForm.get("filterdate"));
    Calendar cal = Calendar.getInstance();
    cal.setTime(date);
    filterMap.put(IWorklistService.FILTER_TYPE_CREATE_DATE_FROM_FILTER,
    cal);
    RemoteWorklistServiceClient client = new RemoteWorklistServiceClient();
    client.init();
    IWorklistContext ctx = client.authenticateUser(user, password);
    List tasks = client.getWorklistTasks(ctx, filterMap,
    IWorklistService.SORT_FIELD_TASK_TITLE,
    IWorklistService.SORT_ORDER_ASCENDING);
    You can see from the above code-fragment that I specify a FILTER_TYPE_CREATE_DATE_FROM_FILTER filter that is given a Calendar object. This is not working properly. Also a Date value gives a runtime error.
    The error I get is :
    ORABPEL-10150 Worklist Service Task List Error. An error occured in the Worklist Service while retrieving the task list for user jcooper. Check the task filter criterion and the error stack and fix the cause of the error. Contact oracle support if error is not fixable. at com.evermind.server.rmi.RMIConnection.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMIConnection.java:1602) at com.evermind.server.rmi.RMIConnection.invokeMethod(RMIConnection.java:1553) at
    Can anyone tell me what kind of dateformat I have to specify for the filter option FILTER_TYPE_CREATE_DATE_FROM_FILTER?
    Thanks in advance!
    Tom

    Hi,
    Enter the format that you have defined in the configuration of the property in the Additional Metadata parameter. Use the syntax customFormat=<pattern>.
    In this link, you have at the end screenshots where to navigate in KM to see the property metadatas of your property:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/645d4357-0701-0010-07bd-a2ea8c4d0aaf
    Here see the Defenitions of the KM Metadata Properties:
    https://wiki.sdn.sap.com/wiki/display/KMC/DefenitionsoftheKMMetadata+Properties
    Regards,
    Praveen Gudapati

  • How to use OData Date filter query to filter data from OData NetWeaver Gateway Service?

    Hello,
    I am trying to use the OData Filter query. to filter data records from the OData Service, using Date range for filters.
    Please check the below URL for the SAP's sample OData Service, with filter option.
    Service Query URL :
    https://sapes1.sapdevcenter.com/sap/opu/odata/sap/ZGWSAMPLE_SRV/SalesOrderCollection?$filter=CreatedAt eq DateTime
    It gives out following error :->
    <message xml:lang="en">'$filter ' is not a valid system query option</message>
    Please let me know, if there is any mistake in the Query or is there anything that needs to be done on the
    Backend  Service.
    Thanks & Regards,
    Suraj Kumar

    Hi Jitendra,
    Once again, thank you for your help.
    I am able to filter the records using a date range.
    I am sharing the information, just in case anyone out there might need it.
    The OData Filter Query for Date Range (i.e. with Two date values) will return the results only if the OData Back-end Service is modified to accommodate such filter requests.
    This has to be done in ABAP.
    Please refer the following links which talks more about the Back-end ABAP Service being modified to ensure that the service returns records of data, as per the date range filter query
    http://scn.sap.com/thread/3170195
    http://scn.sap.com/blogs/lindsay.stanger/2012/12/29/gateway-odata-calls-convert-ivfilterstring-to-itfilterselectoptions
    http://scn.sap.com/thread/3173146
    Hope these links are helpful for those looking for OData Date Range filter query.
    Do let me know.
    Regards,
    Suraj Kumar.

Maybe you are looking for

  • Spem fields are missing In the Query

    Hi this is a FI-Sales Query , under Material Group consists Bags,Caps,wallets ete like these lot of fields but in the query i am not getting all the field. in the query designer every thing is there some fields are not coming like Tie etc,But remeber

  • To convert database in one language into another

    Hey Friends My name is neeraj bansal. I have a MySQL database in dutch language. but i want that database in english language. i have the backup files. i have searched on google but of no use does MySQL provide any facility to convert it or any other

  • Screenshot orientation problems!

    When I take a screenshot of whatever using the power button and the home button in landscape orientation, the photo is saved in portrait orientation in photos. Why? This is not how I took the screenshot. I have 10 apple idevices and 3 of them do this

  • Unable to set JPanel size in BorderLayout.CENTER

    I have a class that defines a GUI for a paint-type program. This class extends JPanel. Within the class, I add a JMenu, a vertical JToolbar to the WEST, a JPanel to the SOUTH and lastly, I add the JPanel that the user draws on in the CENTER. From my

  • Why Siebel and not any other CRM

    What all members have to say: Why Siebel and not any other CRM? Message was edited by: War