Initial clause in Select condition

Hi
I'm wondering how to do this select statement in Transformation routine:
Select single ATTR from TABLE
where ID = lv_ID
and ATTR IS NOT INITIAL
How do I check that it doesn't return a field that is initial, empty null, whatever. I want to cater for all the events where nothing is in that field
Corne

hello,
u can try as:
Select single ATTR from TABLE
into table t_table
where ID = lv_ID
and ATTR NE ' '.
or
Select single ATTR from TABLE
into table t_table
where ID = lv_ID
IF SY-SUBRC EQ 0.
  Delete t_table where attr EQ ' '.
ENDIF.
Regards,
Dhanya

Similar Messages

  • Between Clause in select query

    In the selection screen, i enter April month i.e. 04. Now i have to go 5 months back i.e. November i.e. 11. Now from table T247, I want to select data from November to April. Ho do i do it.

    Hi,
    If you want you can also use BETWEEN clause in select condition.
    Example :
    DATA: LOW TYPE I VALUE '04',
               HIGH TYPE I VALUE '11.
    SELECT FIELDS.....
    FROM TABLE
    INTO TABLE ITAB
    WHERE PARAMETER BETWEEN LOW AND HIGH.
    This will help you.
    Plz reward if useful.
    Thanks,
    Dhanahsri.
    Edited by: Dhanashri Pawar on Jun 18, 2008 11:52 AM
    Edited by: Dhanashri Pawar on Jun 18, 2008 11:53 AM

  • Selection condition in the infopackage for initializing delta

    How does the selection condition in the infopackage help in initializing delta?

    Hi,
    You can enter multiple single valus for any field in the infopackage. Just select the row for material type and then click on the insert duplicate button ( + sign ) which is at the bottom letf hand side in the 'Data Selection' tab within the infopackage. You will usually find this 'insert duplicate' icon next to the 'Check' push button.
    You can insert as many rows as you want for material type by select the material type rown and clicking on this icon. You can then enter the three values in the three rows for material type.
    Regards,
    Shilpa

  • WHERE clause in SELECT statement

    hi experts..
    i want to give 'OR' condition in the 'where' clause of 'SELECT' statement.
    is it possible?
    for examlpe..
    IF EXIDV2 IS NOT INITIAL.
       SELECT * FROM YSDT_SHIPLOAD
                INTO TABLE IG_SHIPLOAD
                WHERE EXIDV2 = EXIDV2 AND
                             VHILM = PC1 OR PC2 OR PC3.
    ENDIF.
    i want that VHILM should be one of those three.
    how can i do this?
    thanks..

    Hi ,
    its possible,
    Select * from ysdt_shipload int table ig_shipload where exidv2 = exidv2
                                                                            AND vhilm = pc1
                                                                            OR     vhilm = pc2
                                                                             OR   vhilm = pc3.
    OR
    Select * from ysdt_shipload int table ig_shipload where exidv2 = exidv2
                        AND (vhilm = pc1 or vhilm = pc2 or vhilm = pc3).
    Regards
    Arani Bhaskar
    Edited by: arani bhaskar on Mar 16, 2009 5:14 PM

  • Regarding  dynamically assigning the where clause to select query

    hi,
      Please send the code regarding how to dynamically assign the where clause to select query.
    thanks in advance

    SELECT <fileds>
            INTO TABLE itab
            FROM dbase
            WHERE  condition.

  • About indexing and select conditions

    Hi,
    Hope to clear some doubts about table indexing...
    1)
    SAP help says that:
    NOT, OR and IN are not supported by indexes unless all of the fields in the SELECT clause and WHERE condition are also contained in the index.
    but how come when I use eg. IN and check the index used through ST05, it still show the selected index? so is it still true that NOT, OR and IN are not supported???
    2)
    Will the positioning of fields in the where condition affect performance when considering the fields in the index?
    eg. field a, b, and c are indexed accordingly in sequence in the table.
    so, if you do the following select...from table
    where a = 1, d = 1, b = 1, c = 1.
    If b and c are positioned in front of d, will it help in performance?
    Thanks,
    Charles

    Hi!
    SAP runs on many different database systems - there are smarter ones and not so smart ones. So some databases won't recognize IN -> can be translate to a list of EQ, others are better and do this 'internally' (your case).
    NOT seems always to corrupt an index use. So instead of 'flag ne space' use 'flag eq c_x'.
    About the order of the fields: no database optimizer should be influenced by the order of the fields, the result should be completely independed of the order of the fields.
    Two reasons, why to code in a specific order:
    - if several programs make identical selects for the same table, then a statement cache can be used - only if the order of the fields in ABAP are identical -> so by convention in the order of the table definition.
    - if you go for a specific iindex, than it's easier to control and understand (for others later), if the fields are programmed in the order of the 2nd index.
    Regards,
    Christian

  • View with selection conditions with system fields.

    Hi Experts,
    I have a view. Now i want to control the data that is selected using 'Selection Conditions'.
    here i want to use system field SY-DATUM.
    My requirement is  i want to control the output like
    Valid_From_Date GE SY-DATUM and
    Valid_To_Date     LE  SY-DATUM
    which means that i would be showing only active users in this view.
    How can i go about this? System is not allowing system fields in comparision value.
    Any help on this is highly appreciated. Thanks.
    regards,
    Simha

    Hi,
    I am getting a warning first 'enter constant as comparision value'
    when i trying to activate the view i am getting the below error.
    A join condition on a field of the system table SY (or SYST) was defined.
    This is not permitted for database views because the system table is not known to the database
    Have tried to activate the view you created?
    How to go about this?
    Regards,
    Simha

  • Selection condition in maintenance view

    I have one table with data related to 5 systems.
    MSF, RET, SER, BOB, SAV, LED.
    I need t o create views with related data for each system. But system BOB contains data related to MSF and RET, So instead of creating view for that i have to add MSF related data to MSF view and RET related data to RET view from BOB system. These all are from one table only.Can you please suggest me the selection condition for that in maintenance view.
    Thanks.

    thanks

  • Adhoc Query : Error during selection; check the selection conditions

    Hi
    We have a report set-up and which we want to run using our adhoc query report tcode S_PH0_48000513
    The report, has a few different selection criteria in it to look at all action IT screen data in the system for ee's in specific personnel areas. There is also a criteria to allow us to paste in specific employee numbers we are interested in. The issue I am facing is that over about 3000 ids, the system automatically returns me a message when I click on the Output button to run the report which states:
    Error during selection; check the selection conditions
    Message no. PAIS206
    I am not sure why this is happening. The selection criteria are fine and the other day I ran the report and I experienced no issues. The report ran successfully. Now though, if I try and paste in all the ids I am interested in (about 8000) I get this message straightaway.
    Can anything be done to overcome this issue?
    Any advice would be much appreciated.
    Nicola

    Hi
    The message in full is:
    Error during selection; check the selection conditions
    Message no. PAIS206
    Diagnosis
    A runtime error occurred during dynamic selection.
    System response
    The runtime error will be caught; no short dump will be created. This error should not occur as a rule. However, very large select statements may trigger the runtime error SAPSQL_STMNT_TOO_LARGE or DBIF_RSQL_INVALID_RSQL. There is no way to prevent this happening. In this case, the error can only be caught.
    Procedure
    Check the selection conditions to see whether the error was caused because the option "Import from text file" included too many objects in the "Multiple selection" dialog. If this is so, you must limit the number of individual values.

  • Not able to put data selection condition in data selection tab of infopakag

    I was loading data from data source as data mart ( export data sauce from ODS) to other ODS.
    when I tried to do delta Initialization with data transfer , I am not able to put data selection condition in data selection tab of infopakage.
    when I choose Full Update in Update tab . It enables data selection fields in data selection tab. and I could put the condition.
    I have checked in transfer structure as well , the fields are marked for selection.
    Please advice .
    Please tell me what could be the reason for this problem

    Ashutosh,
    As you are doing delta upload the data selection tab will be disabled, if you want to do the selective load then you need to do init update with your selection.
    When you do the full updtae then definitely the data selection tab will be enabled for all the objects.
    Hope this helps...
    *******Assign Points if it helps********
    Thanks,
    Gattu

  • How to create a "Selection Conditions" table similar to that found in se11?

    Hi,
    My team is trying to develop a SAP data migration tool (DMT) using ABAP.
    One of the functionalities in the DMT is to validate the data imported to the staging area tables against some reference tables (e.g. SAP tables).
    To do this, I would need to have a "Selection Conditions" table similar to that found in se11 (se11--> Display "View" --> Select "Selection Conditions" tab). This table would allow me to specify my 'referencing' conditions (e.g. Table = "ZMYTAB", Field = "ZMYFLD", OPERATOR = "EQ", Comparison Value = "ZMYTAB2", AND/OR = "").
    Are there any ready-made codes out there for such a "Selection Conditions" table? Or did SAP provide a built-in object for such a table?
    Any help would be greatly appreciated. Thanks!

    personnally I do use the standard FMs for dynamic selections
    see FM FREE_SELECTIONS_DIALOG
    Look at this sample code:
    http://sap.ittoolbox.com/code/archives.asp?i=10&d=2919&a=s

  • Routine in DTP. Selection conditions not visible

    Hello,
    I am under BW7.0
    I am filtering data with a routine in a DTP. The routine is reading a custom table that user maintain. It contains a date range.
    This works, the correct data is selected.
    My problem is that in the request the 'Selection Conditions' field is empty and consequently, I cannot delete in the cube the same selections.
    This was working under BW3.5..
    Many Thanks,
    Alex-

    Hello,
    Here is the code. It is working as I expect. And debugging gives me the correct start and end date. But this is not reflected in the request 'Selection conditions'.
    TYPES:
    BEGIN OF BCSZP_TYPE,
    JJJJPER TYPE ZCBCSZP-ZEITPUNKT,
    RELEV   TYPE ZCBCSZP-RELEVANT,
    END OF BCSZP_TYPE.
    DATA: BCSZP_TAB TYPE STANDARD TABLE OF BCSZP_TYPE,
          BCSZP_WA TYPE BCSZP_TYPE,
          start_date type sy-datum,
          end_date type sy-datum.
      SELECT ZEITPUNKT
             RELEVANT
        FROM ZCBCSZP
        INTO TABLE BCSZP_TAB
       WHERE ZEITPUNKT <> ''.
      READ TABLE BCSZP_TAB INTO BCSZP_WA
      WITH KEY RELEV = 'X'.
      CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
        EXPORTING
          I_GJAHR        = BCSZP_WA-JJJJPER(4)
          I_PERIV        = 'K6'
          I_POPER        = BCSZP_WA-JJJJPER+4(3)
        IMPORTING
          E_DATE         = start_date
        EXCEPTIONS
          INPUT_FALSE    = 1
          T009_NOTFOUND  = 2
          T009B_NOTFOUND = 3
          OTHERS         = 4.
      CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
        EXPORTING
          I_GJAHR        = BCSZP_WA-JJJJPER(4)
          I_PERIV        = 'K6'
          I_POPER        = BCSZP_WA-JJJJPER+4(3)
        IMPORTING
          E_DATE         = end_date
        EXCEPTIONS
          INPUT_FALSE    = 1
          T009_NOTFOUND  = 2
          T009B_NOTFOUND = 3
          OTHERS         = 4.
      read table l_t_range with key
           fieldname = 'FKDAT'.
      l_idx = sy-tabix.
      l_t_range-sign = 'I'.
      l_t_range-option = 'BT'.
      l_t_range-low = start_date.
      l_t_range-high = end_date.
      if l_idx <> 0.
        modify l_t_range index l_idx.
      else.
        append l_t_range.
      endif.
      p_subrc = 0.

  • Problem with process order resource selection condition

    I face a problem while trying to release process order as i am getting an error as "Resource XXXX assigned to operation 20 does not meet resource selection condition".What may be the reason for this.how to check and rectify...
    Please help.

    hi,
    I think you have been using a work center in place of resouce.
    Actually
    Resource catagory = 0008 is assign to Application C (Recipe) & only use in Recipe Creation.
    Work Center catagory = 0005 is assign to Application N & R( Routine & Refernce operation set) & only use in Routine Creation.
    Parminder

  • Variant Configuration: Selection Conditions in BOM

    Hi Experts,
    I am trying to insert more than one selection condition in the BOM. But the system only takes one of this conditions.
    For example I want to have two objects dependencies:
    Selection Condition 1: Engine = 2
    Selection Condition 2: Colour = 'Red'
    instead of
    Selection Condition xy: Engine = 2 and Colour = 'Red'
    Is it possible to use more than one and how can I handle with this. Or is that not possible
    The  system doesn't take the two conditions at the moment...
    What can I do to solve this?
    Thank for your answers,
    Marc

    Hi,
    yes I am talking about object dependency. Especially about selection conditions.
    I want to select the required BOM positions out of the super BOM.
    For that, I have to define this dependencys. But as I mentioned before, only one of the two dependencys gets read and the wrong BOM positions comes out of the explosion.
    Have you any other ideas how to handle with this?
    Thanks a lot.
    Marc

  • How to put OR clause in SELECT statement

    Hi
    How to put OR clause in SELECT statement to return number_first/number_last to match records from another table's column.
    <pre>
    SELECT
    a.id ,
    flat_number ||' '|| a.number_first||' '||a.street_name||' '||a.suburb address1,
    apt_no ||' '|| street_no||' '||b.street_name||' '||b.suburb address2
    from
    a ,
    b
    where b.street_name = a.street_name
    AND b.SUBURB = a.SUBURB
    AND b.STATE = a.STATE
    </pre>
    Thsi will return this as exact match.
    ADDRESS 1
    12 TAMAN TENANG A ORCHARD 3142     
    10 RAMA YISHUN 2095
    ADDRESS2
    12 TAMAN TENANG A ORCHARD 3142     
    10 RAMA YISHUN 2095
    However this only matches number_first.
    How can I get the query work that it will match both number_first and number_last (table b)in address 1 to match street_no in address2 ( table b).My oracle version is 10GR/2.

    Hi, I have a hard time understanding your request, and below is what I thought you want:
    SELECT
        a.id ,
           flat_number ||' '|| (decode(b.street_no, a.number_first, a.number_first, a.number_last, a.number_last)||' '||a.street_name||' '||a.suburb  address1,
             apt_no ||' '|| street_no||' '||b.street_name||' '||b.suburb address2
          from
                 a ,
                 b
                where          b.street_name = a.street_name
                 AND            b.SUBURB      = a.SUBURB
                AND            b.STATE       = a.STATE
                AND  (B.street_no=a.number_first OR b.street_no=a.number_last);Not tested.
    Also, since your B.street_no will be either a.number_first OR a.number_last, you could replace
    (decode(b.street_no, a.number_first, a.number_first, a.number_last, a.number_last) with just b.street_no.
    Edited by: PhoenixBai on Aug 26, 2010 11:33 AM

Maybe you are looking for

  • Installing Windows XP via Fusion on MBPro w/h retina

    I was about to install Windows XP on VMWare Fusion on my MacBook Pro when it asked me to format the hard driver partition in NTFS. Is it ok to do so? Wouldn't that mess up the current OSx file system on the hard drive (or solid state drive in that ma

  • Asking for Suggestions

    I am here to ask for suggestions as to approach with Verizon Wireless as to an error they made that they want me to pay for. You see, I send my payment on the 1st business day of the month, every month, even though the bill is not due until the 17th

  • I have 2 issues: (1) songs are randomly being cut off before they finish and (2) songs are randomly repeating back-to-back.  Help!

    I have a 6th Gen ipod nano that will randomly cut songs off before they are finished.  It also will randomly replay a song before moving on to the next.  Why?? Help!!

  • I want to learn three things

    Hi, I want to learn the following three things *1. Upgrading APEX v.3.0.1 to v3.2.0* v.3.0.1 has been installed on my team server. But I'm not able to upgrade this to v3.2.0 in spite of many docs and tips. I've saved v3.2.0 zip file in the server but

  • Multi database query

    Is it possible to query two databases at the same time? If not is there a workaround for this issue? Thanks