Condition in select

Hi All,
I have a doubt in the following select query.
select * from YL2_M_KOWM  into
table  g_t_itab
where KVEWE IN ('B')
AND KAPPL IN ('WM')
AND EVENT IN ('/RB04/YL4_EA')
AND SPRAS IN ('D','*','')
AND WERKS IN ('0780','*','')
AND LGNUM IN ('001','*','')
AND LGORT IN ('7801', '*' ,'')
AND SLGTY IN ('','*','')
AND DLGTY IN ('','*','').
AND BWART IN ('','','').
In the where condition it is given LGORT IN ('7801' '*' '').can someone explain me about this?
Thanks,
Rakesh

> In the where condition it is given LGORT IN ('7801', '*' ,'').can someone explain me about this?
That translates to LGORT = '7801' OR LGORT = '*' OR LGORT = ''.
Thomas

Similar Messages

  • Receiver Determination, condition to select receiver doesn't extract values

    Dear all!
    I have SAP PI 7.1
    I am facing problem in Receiver Determination while using Condition to select receiver based on the values in the payload.
    I need, if Identificador = 1 then receiver BC_1 and if Identificador = 2 then the receiver BC_2
    My payload has the value:
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:p1="http://pruebas.endesa.es/AME4S_2">
      <soap:Body>
        <p1:MT_WS_SENDER_Q>
          <IDENTIFICADOR>1</IDENTIFICADOR>
          <OBJECT_ID>7600000009</OBJECT_ID>
        </p1:MT_WS_SENDER_Q>
      </soap:Body>
    </soap:Envelope>
    But, the trace shows following:
    <Trace level="2" type="T">......extracting (new) for Extractor: XP /p1:MT_WS_SENDER_Q/IDENTIFICADOR </Trace>
    <Trace level="2" type="T">......extracting values found: 0 </Trace>
    I tried with double quotes, simple quotes, without quotes...
    I tried too with a Receiver Rule (with context) and local rule with xpath....
    Can someone please advise?
    Thanks in advanced!!

    Hello,
    /p1:MT_WS_SENDER_Q/IDENTIFICADOR = 1
    Can you try //p1:MT_WS_SENDER_Q/IDENTIFICADOR = 1 ? I'm sure I read it somewhere here in SDN regarding the xPath difference for stateless and stateless XI 3.0 compatible version is an additional /. It's worth to try
    Hope this helps,
    Mark

  • Dynamic where condition in Select statement

    Hi,
    I have 10 fields on selection-screeen. In which ever field the user enters single values or ranges,i should pick that field dynamically and pass that field along with value range to Where condition of Select statement.How can i achieve this? Please help.
    Regards
    K Srinivas

    see the following example:
    data : begin of itab occurs 0,
             matnr like mara-matnr,
    end of itab.
    ypes: begin of ty_s_clause.
    types:   line(72)  type c.
    types: end of ty_s_clause.
    data : begin of gt_condtab occurs 0.
            include structure hrcond.
    data : end   of gt_condtab.
    FIELD-SYMBOLS <fs_wherecond> TYPE ty_s_clause.
    data:
      gt_where_clauses  type standard table of ty_s_clause
                        with default key.
    gt_condtab-field = 'MATNR'.
    gt_condtab-opera = 'EQ'.
    gt_condtab-low = '000000000000000111'.
    append  gt_condtab.
    clear  gt_condtab.
    call function 'RH_DYNAMIC_WHERE_BUILD'
      exporting
        dbtable         = space " can be empty
      tables
        condtab         = gt_condtab
        where_clause    = gt_where_clauses
      exceptions
        empty_condtab   = 01
        no_db_field     = 02
        unknown_db      = 03
        wrong_condition = 04.
    select matnr from mara into table itab where (gt_where_clauses).

  • Checking conditions in SELECT statement

    Hi All,
    I am relative new to ABAP and I would like to ask a question about checking conditions in SELECT statement in the "WHERE" part.
    There are two checkboxes at the selection screen and each should disable one of  conditions (marked with two stars) in the SELECT mentioned below.
    My question is, whether there exists an option how to solve this problem without using solution like:
    IF checkobx1.
    SELECT (without one condition)
    ELSEIF checkbox2.
    SELECT(without other condition).
    ELSE.
    SELECT (with both conditions)
      SELECT  qprueflos qherkunft qaufnr qsa_aufnr qmatnr qwerkvorg
              qpastrterm  qpaendterm
              qverid qobjnr vobjnr AS objnr_fa vauart
        FROM qals AS q INNER JOIN vkaufk AS v
        ON qaufnr = vaufnr
        INTO CORRESPONDING FIELDS OF TABLE gt_qals
        WHERE q~prueflos IN s_pruefl
          AND q~stat35     EQ space
          AND q~werk       EQ loswk
          AND q~herkunft IN s_herk
          AND q~offennlzmk EQ 0
          AND q~offen_lzmk EQ 0
          AND q~pastrterm IN s_startt
          AND q~paendterm LE s_endt
          AND v~auart IN s_auart.    "('ZCPA', 'ZCPK', 'ZCBA').

    Hi,
    With this, I think u can directly read into WHERE clause
    IF checkbox1.
        v_where = '& BETWEEN ''&'' AND ''&'' '.
        REPLACE '&' WITH key_field INTO v_where.
        REPLACE '&' WITH field_LOW INTO v_where.
        REPLACE '&' WITH field_HIGH INTO v_where.
        CONDENSE v_where.
    ELSEIF  checkbox2.
        v_where = '& BETWEEN ''&'' AND ''&'' '.
        REPLACE '&' WITH key_field INTO v_where.
        REPLACE '&' WITH field_LOW INTO v_where.
        REPLACE '&' WITH field_HIGH INTO v_where.
        CONDENSE v_where.
    ENDIF.
    select * into corresponding fields of table ITAB
                 from (table_name)
                where (v_where).
    In this key_field is your fieldname in the where clause and field_low, field_high are range of values.
    If i write static query it looks like this
    RANGES: MATNR1 FOR MARA-MATNR.
      MATNR1-LOW = MATNR_LOW.
      MATNR1-HIGH = MATNR_HIGH.
      MATNR1-SIGN = 'I'.
      MATNR1-OPTION = 'BT'.
      APPEND MATNR1.
    select * into corresponding fields of table itab
    from mara where matnr BETWEEN 'M100' AND 'M200'.
    Hope it helps u
    thanks\
    Mahesh
    Edited by: Mahesh Reddy on Jan 30, 2009 11:23 AM

  • Can we use 2 Conditions as Selection Variables in a Query?

    Hi Gurus,
    According to the requirement in our report , we need to have selection variables on 2 Key figures Target Quantity and Consumption.
    So ,we have used Conditions to have Variables in the Selection screen.
    The Conditions (the Selection screen variables) are not working properly.
    Can you please give some pointers on the Conditions to be used in the reports.
    Thanks,
    Sravani

    I did not understand whats the issue is...., is it with the condition? or the variable.
    If with the Condition please provide some more details about the condition.
    If it is a variable, as the other person said, how did you create the variable on the Keyfigure? because as per i know we cannot create any variable for the Keyfigure, but if is possible please let me know, and i can dig in to that, and let you know how to fix the issue.
    Regards,
    Ram
    Edited by: Ram Pawan on Aug 14, 2008 4:06 PM

  • URGENT: To change the where condition in select query at runtime ?

    Hi,
    I have to develop a report, 4 which I have created a selection screen with 7 Input Parameters whose value is to be filled by the user while executing the report.
    On the basis of this I do the desired selection of output.
    But the problem is that how do I write my select Query(where condition) if the user enetrs only 2 Input parameters or 3 or whatever he feels like.
    Pls help me out...

    hi,
    check this sample code.
    Here i am populating where condition at runtime.
    DATA: V_WHERE TYPE STRING.
    SELECTION-SCREEN BEGIN OF BLOCK INPUT WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS : S_VBELN FOR VBAK-VBELN,
                     S_ERDAT FOR VBAK-ERDAT.
    SELECTION-SCREEN END OF BLOCK INPUT.
    START-OF-SELECTION.
      PERFORM POPULATE_WHERE.
      PERFORM GET_VBAK_DATA.
    *&      Form  POPULATE_WHERE
    *       Populate Where
    FORM POPULATE_WHERE .
      IF NOT S_ERDAT[] IS INITIAL.
        CONCATENATE 'VBELN IN S_VBELN'
                    'AND'
                    'ERDAT IN S_ERDAT'
              INTO V_WHERE
              SEPARATED BY SPACE.
      ELSE.
        V_WHERE = 'VBELN IN S_VBELN'.
      ENDIF.
    ENDFORM.                    " POPULATE_WHERE
    *&      Form  GET_VBAK_DATA
    *       GET VBAK DATA
    FORM GET_VBAK_DATA .
      SELECT VBELN
             ERDAT
             VBTYP
             NETWR
             WAERK
             VKORG
             VTWEG
             SPART
        INTO CORRESPONDING FIELDS OF TABLE IT_VBAK
        FROM VBAK
        WHERE VBELN IN S_VBELN
        AND   ERDAT IN S_ERDAT.
       WHERE (V_WHERE).
    endform.
    Regards
    Sailaja.

  • Condition on selection screen parameters

    Hi friends,
    I have an ABAP query. Here , I have a date field (ISEG_ZLDAT - Cycle count date ) in the selection screen which is a parameter (not a select option). I have to write a condition for the report to pull all the materials which have a cycle count date less than the value entered on the selection screen.
    How do I give this condition in the code ? Is there a way to do it without using select options ?
    Please help.
    Thanks,
    Dikshitha

    Hi Dikshitha,
        as also said by others try it this way:
    Parameters:
      p_ZLDAT type ISEG-ZLDAT.
    Data:
      t_ISEG like standard table of ISEG.
    select * from ISEG into table t_ISEG where ZLDAT lt p_ZLDAT.
    if sy-subrc ne 0.
    endif.
    With luck,
    Pritam.

  • Condition record selection for MATNR

    Hi Experts,
    I'm selecting the Condition Record Number(a505-knumh) for a Material Number like this.,(I want the record number whose validity date should be greater than today's date and whose begin date should be less than today's date.)
    <b>    select knumh from a505 into i_price-knumh
               where kappl = 'V'
                 and kschl = 'ZR10'
                 and vkorg = '1000'
                 and pltyp = '01'
                 and matnr = itab-matnr
                 and datbi >= sy-datum
                 and datab <= sy-datum.</b>
    But when I see the table a505, there are 3 records(knumh) for that material number (for eg: MATNR = 100813) like this:
    -KAPPL|KSCHL |VKORG |PLTYP|MATNR|DATBI|DATAB  |KNUMH|
    V |ZR10|1000|01|100813 |11/30/1992|08/01/1989|0000037438|
    V |ZR10|1000|01|100813 |04/07/1996|12/01/1992|0000037439|
    V |ZR10|1000|01|100813 |12/31/2039|04/08/1996|0000042185|
    My problem is: When i'm selecting the record like this, it should display the 3rd record as my value.
    but it is showing up the wrong values.
    plz tell me what is the wrong with the selection statement.
    thnx,
    Message was edited by: dev a
    Message was edited by: dev a

    Hi Dev,
    Are you looping internal table itab?
    If you are then each loop the program will overwrite the internal table i_price with the new value. In other word,
    you only get the last value from the select statment result.
    Please try like the following example instead of looping internal table itab.
    SELECT * FROM A306
    INTO CORRESPONDING FIELDS OF TABLE T_HEADER_A306
    FOR ALL ENTRIES IN ITAB_KSCHL
    WHERE KSCHL EQ ITAB_KSCHL-KSCHL AND
           KSCHL IN KSCHL            AND
           VKORG IN P_1              AND
           VTWEG IN P_2              AND
           PLTYP IN L_1              AND
           WAERK IN H_1              AND
           MATNR IN L_3              AND
           KFRST IN L_2              AND
           DATAB >= DATLOW           AND 
           DATAB <= DATHIGH          AND
           KAPPL = 'V'.
    Hope this will help.
    Regards,
    Ferry Lianto

  • Please help - NE where condition in SELECT statement

    Dear experts,
    I am posting a section of my codes here for your review on performance tuning.
    In my second select statement, I used a "NE" where condition. I read somewhere in this forum that using "NE" where condition is not a good decision for improving codes' performance. What alternatives can I have to achieve the same purpose? May I use "NOT IN" here instead? Or do I use a LOOP for this (a rather manual way)?
    Just to let you all know that I still consider myself quite inexperienced in ABAP - please also let me know how I can better improvise my programming techniques in the posted codes here too.
    I will be most glad to provide you with further information if needed - just let me know.
    Many THANKS in advance!
    IF p_noncis = 'X'.      " Non CIS category of spend selected
        " zfi_cis_mat_grp is a bespoke table that stores all CIS MATKL
        " and it has two fields only - MANDT and MATKL
        SELECT * FROM zfi_cis_mat_grp    
        INTO TABLE gt_cis_mat_grp.
        IF gt_cis_mat_grp IS NOT INITIAL.
          SELECT ebeln
                 ebelp
               matkl
          FROM ekpo
          INTO TABLE gt_ekpo
          FOR ALL ENTRIES IN gt_cis_mat_grp
          WHERE matkl NE gt_cis_mat_grp-matkl.    " NE where condition - is this OK?
        ENDIF.
        IF gt_ekpo IS NOT INITIAL.
          IF s_sakto IS NOT INITIAL.
            SELECT ebeln
                   ebelp
                   sakto
            FROM ekkn
            INTO TABLE gt_ekkn
            FOR ALL ENTRIES IN gt_ekpo
            WHERE ebeln = gt_ekpo-ebeln AND
                  ebelp = gt_ekpo-ebelp AND
                  sakto IN s_sakto.
            IF gt_ekkn IS NOT INITIAL.
              SELECT bukrs
                     lifnr
                     belnr
                     budat
                     cpudt
                     xblnr
                     ebeln
                     ebelp
                     zfbdt
                     zterm
                     zlspr
              FROM bsik
              INTO TABLE gt_bsik
              FOR ALL ENTRIES IN gt_ekkn
              WHERE bukrs IN s_bukrs AND
                    lifnr IN s_lifnr AND
                    budat IN s_budat AND
                    cpudt IN s_cpudt AND
                    xblnr IN s_xblnr AND
                    ebeln = gt_ekkn-ebeln AND
                    ebelp = gt_ekkn-ebelp AND
                    qsskz NE ''.
            ENDIF.
          ELSE.
            SELECT bukrs
                   lifnr
                   belnr
                   budat
                   cpudt
                   xblnr
                   ebeln
                   ebelp
                   zfbdt
                   zterm
                   zlspr
            FROM bsik
            INTO TABLE gt_bsik
            FOR ALL ENTRIES IN gt_ekpo
            WHERE bukrs IN s_bukrs AND
                  lifnr IN s_lifnr AND
                  budat IN s_budat AND
                  cpudt IN s_cpudt AND
                  xblnr IN s_xblnr AND
                  ebeln = gt_ekpo-ebeln AND
                  ebelp = gt_ekpo-ebelp AND
                  qsskz NE ''.
          ENDIF.
        ENDIF.
      ELSE.      " Complete list of category of spend selected
        SELECT bukrs
               lifnr
               belnr
               budat
                  cpudt
               xblnr
               ebeln
               ebelp
               zfbdt
               zterm
               zlspr
        FROM bsik
        INTO TABLE gt_bsik
        WHERE bukrs IN s_bukrs AND
              lifnr IN s_lifnr AND
              budat IN s_budat AND
              cpudt IN s_cpudt AND
              xblnr IN s_xblnr AND
              qsskz NE ''.
      ENDIF.

    Hi,
    If you want to remove th NE option then try this way..
    SELECT bukrs
               lifnr
               belnr
               budat
                  cpudt
               xblnr
               ebeln
               ebelp
               zfbdt
               zterm
               zlspr
        FROM bsik
        INTO TABLE gt_bsik
        WHERE bukrs IN s_bukrs AND
              lifnr IN s_lifnr AND
              budat IN s_budat AND
              cpudt IN s_cpudt AND
              xblnr IN s_xblnr .
    IF SY-SUBRC EQ 0.
      Delete gt_bsik where qsskz EQ ' '.
    ENDIF.

  • Using conditions with SELECT

    I am trying to gather conditional data from a table based on data from another as shown below :
    SELECT NEW_ITEM.CD, CLIENT_DISCOUNT.SHOPPER_ID,
    If CLIENT_DISCOUNT.DISCOUNT<=NEW_ITEM.MAX_DISC then NEW_ITEM.BASE_PRICE*((100-CLIENT_DISCOUNT.DISCOUNT])/100)Else NEW_ITEM.BASE_PRICE*((100-NEW_ITEM.MAX_DISC)/100) AS CAT_PRICE
    End If
    FROM NEW_ITEM, CLIENT_DISCOUNT
    WHERE CLIENT_DISCOUNT.SHOPPER_ID='Ted';
    but i am getting the error "FROM is not where expected".
    So my questions are :
    1. If it is possible to put If ... Then ... Else inside a Select query and
    2. If yes, what is the correct syntax.
    Thank you in advance.

    You can use a CASE... END statement in SQL to achieve the desired result.
    Your query would look something like this :
    select n.cd, c.shopper_id, CASE WHEN c.discount <= n.max_disc THEN n.base_price*((100 - c.discount)/100)
    ELSE n.base_price*((100 - n.max_disc)/100)
    END as ItemPrice
    from new_item n , client_discount c where c.shopper_id='Ted'
    Ideally your query should have one more condition like n.itemId = c.itemId in the where clause to limit the
    query results otherwise it will result in a cartesain product.
    Chandar

  • Fetching check number based on condition in selection screen

    In selection screen there r four fields document no,document date ,company code,fiscal year .
    According to client requirement, I have added check number in selection screen. If I enter  the document no in selection screen , the value (bseg –zuonr) should be retrived  in the field check number. If I press F4 in the check number field , the value zuonr based on condition bschl = 50 should be displayed..
    Now it is working fine in development  system.
    But in production it displays 3 values (bschl = 50, bschl = 40 and bschl = 25.Now I need that it should display a single  value based on posting key bseg -bschl = 50 only.
    my code:
    At selection-screen on value-request for P_ZUONR-low.
    select  ZUONR INTO CORRESPONDING FIELDS OF TABLE VALUE_IT1 from BSEG where BELNR IN S_BELNR and BSCHL = '50'.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
           retfield        = 'ZUONR'
           dynprofield =  'P_ZUONR'
           dynpprog    = sy-cprog
          dynpnr      = sy-dynnr
           value_org   = 'S'
           TABLES
         value_tab       = VALUE_IT1
         FIELD_TAB              = IG_BSEG
          RETURN_TAB             = RETURN
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Thanks in advance.

    Hi,
    You can achieve this using Boolean type transient variable.
    > Create a Boolean type Transient variable in VO
    > Use this transient variable as SPELL like ${oa.<view instance>.<view attribute>}
    and in process for request method of controller class. set the value of this transient variable as true or false based on the condition

  • How to include conditions in select query

    i want to write a select query wherein plants have to to be fetched from table vekp
    and if it is a plant then the  set movement type to 999 else leave for exiting.please help me on this

    >
    deep shikha wrote:
    > (This is module pool programming)
    what is modulepool programming doing in form printing forum.
    Please use appropriate forum next time.
    кu03B1ятu03B9к

  • Conditional Mysql select statement

    HI Folks
    can anyone point me in the right direction with a MySQL statement.
    I will try to layout my thinking here:
    I have a form with three inputs area, name and search. I am trying to write a Mysql select statement that selects records from a single table if they match the criteria. Easy for two variables but I'm lost after that.
    1. The form includes these three inputs:
    area - drop down menu (Any as default)
    name - drop down menu (Any as default)
    search box - text area (Blank as default)
    2. The form submits to itself leaving me with these three variables
    $search=$_GET['search']
    $area=$_GET['area']
    $name=$_GET['area']
    SELECT * FROM database WHERE database.description LIKE '%$search%' AND database.area LIKE '$area' AND database.name LIKE '$name'
    3. This is where I get confused. How do I get the SQL to Select everything correctly. I have tried using PHP if/else code to fix it but I end up running around in circles with six different Select statements and haven't yet got that to work.
    So I have come to the conclusion that there must be an easier way.  I see search forms with dozens of  search criteria on websites every day an d I only have 3 - so it can't be this complicated. Right?
    I know I need to start from the beginning again but can anyone let me know how to approach it before I begin?
    Cheers
    Dave

    Typically, I would build the where clause dynamically, based upon the values in your form. If the form field contains 'Any', leave it out of the where clause. So you can test each field value and either append or not to the end of the where clause.

  • Condition in Select Query

    Hi,Please help to get the output. Thanks.
    create table #Real (R1 numeric, R2 numeric, R3 char(10), R4 numeric, R5 char(10))
    Insert into #real values (111,900,'PN-UFT',10, 'PN')  --R2 and R3 are same for this group
    Insert into #real values (112,900,'PN-UFT',10, 'PN')
    Insert into #real values (113,900,'PN-UFT',20, 'PN')
    Insert into #real values (114,900,'PN-UFT',20, 'PN')
    Insert into #real values (115,901,'PS-UFT',10, 'PS') --R2 and R3 are same for this group
    Insert into #real values (116,901,'PS-UFT',10, 'PS')
    Insert into #real values (117,901,'PS-UFT',20, 'PS')
    Insert into #real values (118,901,'PS-UFT',20, 'PS')
    Insert into #real values (119,902,'PT-UFT',10, 'PS') --R2 and R3 are same for this group
    Insert into #real values (120,902,'PT-UFT',10, 'PS')
    Select * from #real where (If R4=20 then pick these records else pick R4=10 records)
    Output should be:
    R1 R2 R3 R4 R5
    113 928 PN-UFT     20 PN       
    114 942 PN-UFT     20 PN       
    117 894 PS-UFT     20 PS       
    118 837 PS-UFT     20 PS       
    119 823 PS-UFT     10 PS       
    120 843 PS-UFT     10 PS       

    I need to Ignore the rows where R4=10 because I need R4=20 but if R4=20 doesn't exist then should pick R4=10.
    Eaxmple-1: Here R4 has 10 and 20 so should pick records of '20''
    create table #Real (R1 numeric, R2 numeric, R3 char(10), R4 numeric, R5 char(10))
    Insert into #real values (111,900,'PN-UFT',10, 'PN')  
    Insert into #real values (112,900,'PN-UFT',10, 'PN')
    Insert into #real values (113,900,'PN-UFT',20, 'PN')
    Insert into #real values (114,900,'PN-UFT',20, 'PN')
    My desired output is:
    R1 R2 R3 R4 R5
    113 900 PN-UFT     20 PN     
    114 900 PN-UFT     20 PN     
    Eaxmple-2: Here R4 has not records of ''20'' so should pick the record of ''10"
    create table #Real (R1 numeric, R2 numeric, R3 char(10), R4 numeric, R5 char(10))
    Insert into #real values (115,901,'PS-UFT',10, 'PS')  
    Insert into #real values (116,901,'PS-UFT',10, 'PS')
    My desired output for this is:
    R1 R2 R3 R4 R5
    115 901 PS-UFT     10 PS     
    116 901 PS-UFT     10 PS 

  • Where condition in select query

    my requirement is this. I want to fetch some records
    from DB table. The field objnr has 12 characters.
    i will supply a substring of this field. the substring
    starts at the 3rd location of field.
    SELECT objnr FROM cosp INTO TABLE gt_itab
                  WHERE objnr like srch_str.
    how to do this? could u give me a possible solution?

    Then you're going to have to go at it this way
    TABLES: cosp.
    DATA:
      BEGIN OF gt_itab OCCURS 0,
        objnr      LIKE cosp-objnr,
      END OF gt_itab.
    DATA:
      wk_objnr      LIKE cosp-objnr,
      srch_str(22) VALUE '1000',
      ss_len       TYPE i.
    START-OF-SELECTION.
      ss_len = strlen( srch_str ).
      SELECT objnr FROM cosp INTO gt_itab-objnr.
        CHECK gt_itab-objnr+2(ss_len) = srch_str.
        APPEND gt_itab.
      ENDSELECT.
    Or this way.
    TABLES: cosp.
    DATA:
      BEGIN OF gt_itab OCCURS 0,
        objnr      LIKE cosp-objnr,
      END OF gt_itab.
    DATA:
      cntlarea(22)  TYPE c  VALUE '1000',
      wk_objnr      LIKE cosp-objnr,
      srch_str(50),
      ss_len       TYPE i.
    START-OF-SELECTION.
      CONCATENATE '%' cntlarea '%' INTO srch_str.
      ss_len = strlen( cntlarea ).
      SELECT objnr FROM cosp INTO gt_itab-objnr
        WHERE objnr LIKE srch_str.
        CHECK gt_itab-objnr+2(ss_len) = cntlarea.
        APPEND gt_itab.
      ENDSELECT.
    Edited by: Paul Chapman on May 29, 2008 8:33 AM

Maybe you are looking for

  • Adjustments made in Camera Raw not opening in CS2

    After opening an image in Bridge and adjusting in Camera Raw if I open it in Photoshop the adjustments are lost. Any ideas?

  • - About the new Flash object fix in 8.0.2

    Any way to tell DW8.0.2 not to automatically create a Scripts folder and new .js file when inserting a Flash object, but STILL have it insert the HTML portion? Reason I'm asking is because I've got the .js part included in my main .js file on all my

  • Photoshop CS6 has quit working, the program will now close.

    Recently after installing adobe flash pro CS6 (It didnt work -.- just said i didnt have permissiosn or the file was missing) My photoshop CS6 and After effects CS4 just quit when I run them. I cant seem to find a fix for this. I even did a system res

  • "statement cannot reached " error?

    Hi, I have a question regarding client-server . I am sending message to Server from Client. But I don't know how many messages come to Client from Server. I'm getting all messages from server,but couldn't send message again to server. I 'm getting er

  • Showing a stage on a different display that is connected to the system

    I want to implement something in my javafx destop application which I am not sure how to achieve. I am neither sure whether it can be achieved or not. So thought some expert guidance will come in handy. Bascially, I have an application built in javaf