Reg select query problem

hi all,
hope all r doing fine?
anyway i have a query which is mentioned below:-
select field1,.....fieldn
         from <dbtable1>
         into corresponding fields of table itab
         where <condition>.
select field1,...fieldn
          from <dbtable2>
         appending corresponding fields of table itab
        where <condition>.
the above two select stmts retrieve same set of  fields from two different database tables into same internal table itab..
now my question is ...........is any other way to change 2nd select statement without using appending correspondin fields
but the functionality should remain the same as it is after changing..................
bcos appending corresponding is causing performance problem in data retrieval.
thanx alot in advance.
for sure points will be given for all the helpful answers
Jack

Hi,
You can use like that:
select field1,.....fieldn
from <dbtable1>
into corresponding fields of table itab1
where <condition>.
select field1,...fieldn
from <dbtable2>
appending corresponding fields of table itab2
where <condition>.
now u use:
loop at itab2 into w_itab2.
read table itab1 into w_itab1 with key w_itab1-<primary field> = w_itab2-<Primary field>.
if sy-subrc = 0.
  append w_final into i_final.
else continue.
endif.
endloop.
*i_final table having all data ( i.e itab2 & itab1 data)

Similar Messages

  • Select query problem in JDBC sender adapter

    Hello Experts,
    We have a problem with PI sender adapter that PI has started to miss records in database some database records are missing and we are using the below selet query :
    SELECT * FROM [database name].[dbo].[Material_Movement] WHERE [Process_Order_Number] = (Select TOP 1 [Process_Order_Number] FROM [database name].[dbo].[Material_Movement] WHERE ([PI_Read_Date] IS NULL AND [Movement_Type] = (SELECT TOP 1 [Movement_Type] FROM [database name].[dbo].[Material_Movement] WHERE [Transaction_Code] = 'xyz' AND [PI_Read_Date] IS NULL ORDER BY Created_Date ASC))) AND [Transaction_Code] = 'xyz' AND [Movement_Type] = (SELECT TOP 1 [Movement_Type] FROM [database name].[dbo].[Material_Movement] WHERE [Transaction_Code] = 'xyz' AND [PI_Read_Date] IS NULL ORDER BY Created_Date ASC) AND [PI_Read_Date] IS NULL ORDER BY [Transaction_ID] ASC
    I am weak in select query could you please check and suggest how the query can be modified to avoid this issue .
    Thanks,
    Somenath

    Hi ,
    After looking into These Query .. I found ...
    Your Query Will run such Kind of scenario ..
    1.)   Movement Type will be fetched from from below Query
            SELECT TOP 1 Movement_Type
            FROM database name.dbo.Material_Movement
            WHERE Transaction_Code = 'xyz'
           AND PI_Read_Date IS NULL
            ORDER BY Created_Date ASC
    2.) on the  basis of abovr fetched  moment code . your Query will fetch 1 Process Order number
    Select TOP 1 Process_Order_Number
    FROM database name.dbo.Material_Movement
    WHERE ( PI_Read_Date IS NULL
                  AND Movement_Type =  Moment Type will be same as 1.
    3.)
    After  Getting 1 and 2 . Query will fetch Data  from table " dbo.Material_Movement "
    On the basis of ..
    Movement_Type = value from 1.
    Process_order_type = value from 2.
    Transaction_Code = 'xyz'
    ORDER BY Transaction_ID ASC
    So check Missed record Fullfill this Condition or not ....................
    If not ... You will get why they are not picked by your given Query ...........
    Hope it helps ..
    regards
    Prabhat Sharma.

  • Reg select query

    Hi Guys,
    I got a problem with select query...could you polease help me out...plz check the second select query statement
    when i open tstcp table i gave Ztable and then when I exceute i am able to get the list when i do it programatically it is not working .....
    any suggestions...points will be rewarded..
    select tabname
                   from dd02l into table i_dd02l where tabname like 'Z%' and
                                                  ( tabclass = 'VIEW'
                                                          or
                                                   tabclass = 'TRANSP' ) and
                                                  ( mainflag = 'X'
                                                          or
                                                    mainflag = '' ).
    if not i_dd02l[] is initial.
    loop at i_dd02l.
    v_tabna = i_dd02l-tabname.
    select single tcode
                  param into (v_tcode , v_param)
                  from tstcp where param like '%v_tabna%'.
    i_tstcp-tcode = v_tcode.
    i_tstcp-param = v_param.
    append i_tstcp.
    clear i_tstcp.
    endloop.
    endif.
    Regards,
    Ravi Ganji

    Hi ,
      The statement will not work because it will try to find all records which has v_tabna in its field.
    So what you need to do is concatenate % before and after the value of the varaible v_tabna and store it in some varaible say v_value and use it in the where clause.
    so your code will look like this
    *v_tabna = i_dd02l-tabname.
    concatenate '%'  i_dd02l-tabname '%' into v_tabna
    select single tcode
    param into (v_tcode , v_param)
    from tstcp where param like tabna.
    Regards
    Arun

  • Select Query Problem

    Hi Experts,
    I am having a select query in which I am using a variable in the where condition but it is giving error. Please suggest how to use variable in the select query.
    The query I am using is a s below.
    select * from zexc_rec into table it_ZEXC_REC
          where
           LIFNR in S_LIFNR and
          DOCNO in S_DOCNO and
          DOCTYP in doc_typ and
          DATE1 in S_DATE1 and
          MATNR in S_MATNR.
    Here doc_typ is a variable.
    Thanks.

    Rahul,
    use RANGES type variable instead of variable . It acts as a select-options variable. Thn use this variable in SELECT query with IN.
    Eg :
    RANGES r_t510 FOR t510-lgart.
        r_t510-low = '1600'. 
        APPEND r_t510.
        r_t510-low = '3190'. 
        APPEND r_t510.
    Note  : can be use SIGN, OPTIONS properties too in RANGES type.
    More deatils go through on HELP of RANGES
    Rgds,
    Ranjith

  • Multiple Schema select Query problem

    Hi everyone,
    when I tried to execute a select query as following,
    select A.field1, B.field2 from S1.table1 A, S2.table2 B
    in a session bean, it gives an exception as follows
    " An illegal attempt to use multiple resources that have only one-phase capability has occurred within a global transaction"
    Can anyone pls help me in this regard.
    Thanking you
    D. Suresh Kumar

    This is the query i thought of executing
    SELECT * FROM SCH2.AP_TRANSACTION_EPS A, TRANSACTION_TYPES B WHERE C_FUND_CODE = '" + fundCode + "'AND D_TRADE_DATE = to_date('" + date + "','yyyy-mm-dd') AND A.C_TRANS_CODE = B.C_TRANS_CODE " + " AND B.C_TRANS_TYPE = '" + transType + "' ";
    where "fundCode", "date","transType" are java variables.
    The error message is
    [8/1/03 12:38:49:688 IST] 491a6a5 TransactionIm E WTRN0062E: An illegal attempt to use multiple resources that have only one-phase capability has occurred within a global transaction.
    [8/1/03 12:38:49:750 IST] 491a6a5 ConnectO A CONM6014I: Received exception (IllegalStateException) in method (enlist). Issuing new exception (IllegalTransactionStateException). The original exception's stack trace was: java.lang.IllegalStateException
    Thanking you

  • Sql select query problem

    hi friends,
    i've a view called "risk_efforts" with fields user_id,user_name,wknd_dt,week_day,prod_efforts,unprod_efforts.
    Name Type
    ROW_ID NUMBER
    USER_ID VARCHAR2(14)
    USER_NAME VARCHAR2(50)
    WKND_DT VARCHAR2(8)
    WEEK_DAY VARCHAR2(250)
    PROD_EFFORTS NUMBER
    UNPROD_EFFORTS NUMBER
    data is like this:
    when there is some data in prod_efforts, unprod_efforts will be null
    when there is some data in unprod_efforts, prod_efforts will be null
    for example:
    USER_ID     USER_NAME     WKND_DT     WEEK_DAY     PROD_EFFORTS     UNPROD_EFFORTS
    G666999     GTest     20100403     TUE     null 3
    G666999     GTest     20100403     TUE     14     null
    now i want to combine these 2 rows into 1 row i.e o/p should be like this
    USER_ID     USER_NAME     WKND_DT     WEEK_DAY     PROD_EFFORTS     UNPROD_EFFORTS
    G666999     GTest     20100403     TUE     14 3
    i've tried all combinations but couldn't get the query. Please help me with the exact SQL select query.
    thanks,
    Girish

    Welcome to the forum.
    First read this:
    Urgency in online postings
    Secondly, it's always helpful to provide the following:
    1. Oracle version (SELECT * FROM V$VERSION)
    2. Sample data in the form of CREATE / INSERT statements.
    3. Expected output
    4. Explanation of expected output (A.K.A. "business logic")
    5. Use \ tags for #2 and #3. See FAQ (Link on top right side) for details.
    You have provided #3 and #4. However with no usable form of sample data forum members will often not respond as quickly as they could if you provided #2.
    I'm just wagering a guess here but what about this:SELECT ROW_ID
    , USER_ID
    , WKND_DT
    , WEEK_DAY
    , MAX(PROD_EFFORTS) AS PROD_EFFORTS
    , MAX(UNPROD_EFFORTS) AS UNPROD_EFFORTS
    FROM RISK_EFFORTS
    GROUP BY ROW_ID
    , USER_ID
    , WKND_DT
    , WEEK_DAY                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • SELECT query - problem with SORT

    Hi,
    Same select query behaves different way on development and quality server
    on Development it returns unsorted and Quality returns sorted
    it can be resolved by SORT but why does it behave differently
    Do you know what is setting in database
    thanks

    From F1 on SELECT:
    Orders the records in a SELECT statement. Without the ORDER-BY clause, the order
    in which the selected lines are supplied is undefined. This means that two similar SELECT
    statements may produce lines in a different order.
    Rob

  • Abap select query problem

    This report will take delivery document number and delivery date from user and fetches details from delivery table and fetches
    corresponding sales order details and billing details  and displays sales order details with ALV list.
    << Please only post the relevant portions of your code >>
    i just want to know that is this way of fetching the data into internal table okay ?are there any better ways of fetching the data into the internal table ? why  is it looping in work area of lips, why not in likp?
    (plz dont use field-symbols or oo abap or macros) I WANT TO USE PLAIN AND SIMPLE ABAP STATEMENTS LIKE ABOVE..
    By using "vbeln type lips-vbeln" are we refering to the field or data element? plz suggest.
    P.S.           [my approach was to inner join likp and lips into itab(my internal table).
    select data from kna1, vbak,vbap,vbrp into respective internal tables like it_kna1,it_vbak etc.
    then using individual loops into the tables, i would use read table to insert data into itab(my final internal table) plz suggest which method wud be more efficient? ]
    Edited by: Rob Burbank on Jun 8, 2009 11:54 AM

    ok i am posting the select queries once again.
    i want to know why are we looping in t_lips and why not t_likp? bcoz tlikp is the header table, if we loop thru it and then read the rest tables then what will be the problem? plz clarify with examples._
    [my idea was to loop at t_likp then read t_lips.append the lips data into t_order(main internal table).then do read table on t_kna1,t_vbap etc indexing t_order. so plz suggest whether my approach was write or wrong?if wrong why?plz site any other ways of doing this query.
    types: begin of ty_vbap,
           vbeln type vbap-vbeln,
           posnr type vbap-posnr, .....
    does the declaration statement in types refer to tables or data elements? what is the difference if we declare it like:
       types: begin of ty_vbap,
           vbeln type vbeln,
           posnr type posnr, .....
    select-options:
    s_deldoc FOR likp-vbeln, " Delivery
    s_dldate FOR likp-lfdat. " Delivery Date
    Get delivery document number,delivery date,customer number from
    delivery header table
    SELECT vbeln " Delivery
    lfdat " Delivery Date
    kunnr " Customer Number 1
    FROM likp
    INTO TABLE t_likp
    WHERE vbeln IN s_deldoc
    AND lfdat IN s_dldate.
    IF sy-subrc EQ 0.
    Get Customer name for customer numbers from Customer master table
    SELECT kunnr " Customer Number 1
    name1 " Name 1
    FROM kna1
    INTO TABLE t_kna1
    FOR ALL ENTRIES IN t_likp
    WHERE kunnr EQ t_likp-kunnr.
    IF sy-subrc EQ 0.
    Get delivery item number,sales document number,sales item number,
    delivery quantity from delivery item table
    SELECT vbeln " Delivery
    posnr " Delivery Item
    vgbel " Document number of
    " reference document
    vgpos " Item number of reference item
    lfimg " Actual quantity delivered
    vrkme " Sales unit
    FROM lips
    INTO TABLE t_lips
    FOR ALL ENTRIES IN t_likp
    WHERE vbeln EQ t_likp-vbeln.
    IF sy-subrc EQ 0.
    Get sales document number,item number,material,material description,
    ordered quantity from sales item table
    SELECT vbeln " Sales Document
    posnr " Sales Document Item
    matnr " Material Number
    arktx " Short text for sales order
    " item
    kwmeng " Cumulative Order Quantity
    vrkme " Sales unit
    FROM vbap
    INTO TABLE t_vbap
    FOR ALL ENTRIES IN t_lips
    WHERE vbeln EQ t_lips-vgbel
    AND posnr EQ t_lips-vgpos.
    IF sy-subrc EQ 0.
    Get sales document number ,created date,purchase order number from
    sales header table
    SELECT vbeln " Sales Document
    erdat " Date on Which Record Was" Created
    aufnr " Order Number
    FROM vbak
    INTO TABLE t_vbak
    FOR ALL ENTRIES IN t_lips
    WHERE vbeln EQ t_lips-vgbel.
    IF sy-subrc EQ 0.* Get billing document number,billing item,reference delivery document
    number,delivery item number,billing item from billing item table
    SELECT vbeln " Billing Document
    posnr " Billing item
    vgbel " Document number of the
    " reference document
    vgpos " Item number of the" reference" item
    fklmg " Billing quantity in" stockkeeping unit
    vrkme " Sales unit
    FROM vbrp
    INTO TABLE t_vbrp
    FOR ALL ENTRIES IN t_lips
    WHERE vgbel EQ t_lips-vbeln
    AND vgpos EQ t_lips-posnr.
    ENDIF. " IF SY-SUBRC EQ 0
    ENDIF. " IF SY-SUBRC EQ 0
    ENDIF. " IF SY-SUBRC EQ 0
    ENDIF. " IF SY-SUBRC EQ 0
    ELSE.
    Display message if records are not found for entered values
    MESSAGE S000.
    EXIT.
    ENDIF. " IF SY-SUBRC EQ 0
    Looping Delivery item internal table to assign values to order
    internal table
    LOOP AT t_lips INTO fs_lips.
    Get delivery date and customer number for delivery document number
    from delivery header internal table
    READ TABLE t_likp WITH KEY vbeln = fs_lips-vbeln
    INTO fs_likp.
    Get customer name for customer number from customer master internal
    table
    IF sy-subrc EQ 0.
    READ TABLE t_kna1 WITH KEY kunnr = fs_likp-kunnr
    INTO fs_kna1.
    Get sales document number,item number,ordered quantity for delivery
    document number,item number from sales item internal table
    IF sy-subrc EQ 0.
    READ TABLE t_vbap WITH KEY vbeln = fs_lips-vgbel
    posnr = fs_lips-vgpos INTO fs_vbap.
    Get goods issue date and purchase order number for sales document
    number from sales header internal table
    IF sy-subrc EQ 0.
    READ TABLE t_vbak WITH KEY vbeln = fs_vbap-vbeln INTO fs_vbak.
    IF sy-subrc EQ 0.
    Get billing document number,billing item,billing quantity for delivery
    document number,delivery item number from billing item internal table
    READ TABLE t_vbrp WITH KEY vgbel = fs_lips-vbeln
    vgpos = fs_lips-posnr INTO fs_vbrp.
    Assign sales,delivery,billing fields into respective fields of sales
    order internal table
    IF sy-subrc EQ 0.
    fs_order-vbeln = fs_vbap-vbeln.
    fs_order-posnr = fs_vbap-posnr.
    fs_order-erdat = fs_vbak-erdat.
    fs_order-kunnr = fs_likp-kunnr.
    fs_order-name1 = fs_kna1-name1.
    fs_order-aufnr = fs_vbak-aufnr.
    fs_order-matnr = fs_vbap-matnr.
    fs_order-arktx = fs_vbap-arktx.
    fs_order-kwmeng = fs_vbap-kwmeng.
    fs_order-vrkme = fs_vbap-vrkme.
    fs_order-vbeln1 = fs_lips-vbeln.
    fs_order-posnr1 = fs_lips-posnr.
    fs_order-lfimg = fs_lips-lfimg.
    fs_order-vrkme1 = fs_lips-vrkme.
    fs_order-vbeln2 = fs_vbrp-vbeln.
    fs_order-posnr2 = fs_vbrp-posnr.
    fs_order-fklmg = fs_vbrp-fklmg.
    fs_order-vrkme2 = fs_vbrp-vrkme.
    APPEND fs_order TO t_order.
    CLEAR fs_order.
    ENDIF. " IF SY-SUBRC EQ 0
    ENDIF. " IF SY-SUBRC EQ 0
    ENDIF. " IF SY-SUBRC EQ 0
    ENDIF. " IF SY-SUBRC EQ 0
    ENDIF. " IF SY-SUBRC EQ 0
    ENDLOOP. " LOOP AT T_LIPS INTO FS_LIPS

  • Select Query problem....too urgent

    Hi all!
    I am running oracle 8i.
    I have a table named taxsuamry. I want to arrange the data by exepenses in desc order and after sorting, i want to select first 50 records.
    I supplied the follwoing query:
    select expenses from taxsuamry
    where rownum<51
    order by expenses desc;
    but it selects 50 records first and then sorts them...i want sorting first and then top 50 rerods from sorted data.
    Can anybody help me plz

    hello,riaz
    If it is optimization kind of problem for your sorting first ...then u can go for following way...
    select /*+ index(empid) */ empid from emp where rownum <51 order by empid desc
    .........where empid is attribute where u have index on it....
    null

  • Select Query Problem-need help

    hi,
    Help me out from this problem.
    Actually i have a table and the data in it as follows:
    Department Name Job Name
    Accounts Sr. Accountant
    Accounts Jr. Accountant
    Accounts Cleark
    But i dont want the repeated Department Name.. and i want the same output as follows.
    Department Name Job Name
    Accounts Sr. Accountant
    Jr. Accountant
    Cleark
    Without using sql reports and Sql Plus additional commands.
    The same output should come from a sql query only.
    Thanks in Advance
    Md Anwer Ali

    I shouldn't try to code before I have had at least three cups of coffee. The actual answer is:
    select decode(department,lag(department) over (order by department),null,department)
    , job
    from departments
    order by department.
    I ran this:
    select decode(job,lag(job) over (order by job),null,job)
    , ename
    from emp
    order by job
    and got this result:
    SQL> /
    DECODE(JO ENAME
    ANALYST SCOTT
    FORD
    CLERK SMITH
    ADAMS
    MILLER
    JAMES
    MANAGER JONES
    CLARK
    BLAKE
    PRESIDENT KING
    SALESMAN ALLEN
    MARTIN
    TURNER
    WARD
    14 rows selected.

  • Selection query problem

    hi all.....
    i want to setct some data from table vbrp ,vbrk and vbfa .
    on selection screen i have vbrk-vbeln and vbfa-erdat i hav written one code for tht but thts not working can nybdy plz help me in this..
    parameter : p_vbeln type vbrk-vbeln ,
                p_erdat type vbfa-erdat  .
    *--start of selection events
    start-of-selection.
    *--SELECTING THE DATA FROM DATABASE INTO INTERNAL TABLE
    SELECT v1~vbeln AS vbeln
            v1~kunag AS kunag
            v1~vkorg AS vkorg
            v1~netwr AS netwr
            v2~ntgew AS ntgew
            v2~matnr AS matnr
            v3~erdat AS erdat
            INTO CORRESPONDING fields of table it_data1
        FROM vbrk AS v1
        INNER JOIN vbrp AS v2
           ON v1vbeln = v2vbeln
        INNER JOIN vbfa AS v3
           ON v1vbeln = v3vbeln
            WHERE v1~vbeln eq p_vbeln .
       loop at it_data1 into wa_data where erdat ne p_erdat.
       delete it_data1 from wa_data.
    endloop.
    end-of-selection.
    thanks in advance.....

    How have you defined your itab ?
    You query looks perfectly ok , even if you use vbeln or vbelv it wont matter , it depends on the requirement.
    So have you defined your itab correctly ?
    for example :
    data : begin of itab occurs 0,
             vbeln like vbrk-vbeln,
             kunag like vbrk-kunag,
             netwr like vbrk-netwr,
             ntgew like vbrp-ntgew,
             matnr like vbrp-matnr,
             erdat like vbfa-erdat,
             end of itab.
    regards,
    Advait

  • Problem with select query

    Hi All,
    i_dfkkko-xblnr
      IF NOT i_dfkkko[] IS INITIAL       .
        SELECT opbel
               belnr
               FROM erchc
               INTO TABLE i_erchc1
               FOR ALL ENTRIES IN i_dfkkko
               WHERE opbel EQ i_dfkkko-xblnr.
      ENDIF.
    I am using the above select query.problem is when i put the value
    of i_dfkkko-xblnr by going to the table erchc i am getting the record.But this qury is not resulting any value.
    i have checked in debug mode copied the value of xblnr of i_dfkkko
    and went to erchc table and passed to opbel of erchc i got the reords.
    can anybody pls help..
    Rgds,
    Sai

    Hi,
    The database would be having the value with leading zeroes.
    Use FM "CONVERSION_EXIT_ALPHA_INPUT" to conver the values & then pass to select query.
    _dfkkko-xblnr
    IF NOT i_dfkkko[] IS INITIAL .
    loop at i_dfkkko.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    VALUE(INPUT) = i_dfkkko-xblnr
    IMPORITNG
    VALUE(OUTPUT) = i_dfkkko-xblnr.
    modify i_dfkkko.
    endloop.
    SELECT opbel
    belnr
    FROM erchc
    INTO TABLE i_erchc1
    FOR ALL ENTRIES IN i_dfkkko
    WHERE opbel EQ i_dfkkko-xblnr.
    ENDIF.

  • Select query for 6 different tables with vbeln as same selction criteria

    Hi,
    I have a query..
    I am using 6 differnet tables with vbeln being the same primary key on the basis of which i have to match the data.
    I have assign vbeln with different name but in the select query it gives me the error that vbeln2 is not the correct field.
    Can anyone please suggest how can i use the different field name and read the data from the table.

    hi,
    Use alias name for fields / tables in select query, problem will solve
    Regards,
    Praveen Savanth.N

  • Mind bender select query condition

    I posted a thread called very interesting select query problem. Because I am new I did not set the question as unanswered. The question is :
    I have selected some material documents from bkpf into i_bkpf. then by looping on it I broke down the AWKEY into mblnr and mjahr and modified the same internal table. Then I created a data base view YMCSKS joining MKPF and MSEG.
    I want to write a select query which does not select mblnr and mjahr from YMCSKS which are already there in i_bkpf
    sort of like this
    select.......
    from VIEW (YMCSKS)
    where MBLNR <> i_bkpf-mblnr

    Manas
    PK is correct.  You've had the same question rejected twice yesterday - do you read your email?    You've really not provided enough information, and so the problem looks very much like you are wanting other people to do your work.  This is no "mind bender".  If you can't do it, then you need to be very clear about what you've already tried - newbies are welcome here, but evidence of effort is expected.
    Rudeness is not tolerated, so please keep the conversation civil.
    If you would like to give more information about what you've tried, and where you are struggling, then I shall leave the thread open.  I'm inviting you to restate your question.
    mâtt

  • Reg: Problem in select query..

    Hi all,
    I want to write a select query for table COEP. Like if you open SE16 and give KSTAR with S5* we will get full data related to S5xxxxx. Same like I am trying to write for select.
    TYPES: BEGIN OF T_COEP,
             BELNR  TYPE CO_BELNR,  " PLANT
             PERIO  TYPE CO_PERIO,  " Period
             KSTAR  TYPE KSTAR,     " Cost Element
             WERKS  TYPE WERKS_D,   " PLANT
             MATNR  TYPE MATNR,     " Material Number
           END OF T_COEP.
    data: I_COEP   TYPE STANDARD TABLE OF T_COEP,
          W_COEP   TYPE T_COEP.
      SELECT BELNR  " DOCUMENT NO
             PERIO  " Period
             KSTAR  " Cost Element
             WERKS  " PLANT
             MATNR  " Material Number
        FROM COEP
        INTO CORRESPONDING FIELDS OF TABLE I_COEP
        WHERE KSTAR = C_S5.(HERE want I need give)*
      LOOP AT I_COEP INTO W_COEP.
        WRITE:/ W_COEP-BELNR, W_COEP-PERIO, W_COEP-KSTAR,
                W_COEP-WERKS, W_COEP-MATNR.
      ENDLOOP.
    Moderator message - Please search before asking - post locked
    Edited by: Rob Burbank on May 15, 2009 1:34 PM

    Hi,
    write the code like this..
       SELECT BELNR  " DOCUMENT NO
              PERIO  " Period
              KSTAR  " Cost Element
              WERKS  " PLANT
              MATNR  " Material Number
         FROM COEP
         INTO CORRESPONDING FIELDS OF TABLE I_COEP
         *WHERE KSTAR = C_S5*.(HERE want I need give)*
          where kstar in 'c_s%'.     "write % it will acts like *
    Regards,
    Prabhudas

Maybe you are looking for

  • How do I convert a file size to decimal so I can assign an isbn to my book?  my size is 802 kb and have no idea what this means.

    I am an independent author that has purchased the batch of 10 isbn's from bowker.  When I put in all the information to assign the isbn to my book, it tells me the file size must be converted to decimal.  I have searched the internet and understand t

  • MS SQL Server to Oracle

    I am going to write all of the steps here that I have used trying to connect Oracle to MS SQL Server, so that others may benefit. I spent a few days using the following document, but in the end it turned out to be fairly incomplete, and I was frustra

  • Slow Display due to LCD?

    Hi fellow Developers out there... I have just written a VERY simple game, that displays a ball running over a background. The code was inspired by several other postings that I read. It all works fine (so it is displayed and the ball is moving) but i

  • Photoshop CS5 Win 64bit, selection/point glitchy?

    Hi guys, I'm trialing CS5 on 64bit at the moment, just wondering if anyone has had experience, where when using the selection tool, or move tool or any tool where you need to select or draw out something, I am regularly getting a glitch where where I

  • Connecting Cisco AIR-CAP2602E over WAN with WLC - Procedural Details

    Hi, I have a Wireless LAN Controller Installed in one of the subnets where some AIR-CAP2602E's are connected with the WLC. WLC acts as DHCP for the AIR-CAP2602E Devices. I have additional AIR-CAP2602E access-points at other location (Subnet) and Need