Code Inspector with 'SELECT * FROM'

Hello all,
I want to tell my code inspector, that it shall find
Select * from.
I put it in the ABAP STATEMENT PATTERNS but now the code inspector finds all selects for it interpretates * as wildcard.
What can I do ?
Please help
Simone

as you ask this question in the performance forum, I would also like to know why you want to see all 'select *'.
If you want to solve any performance problems then I should say, that it will not help.
Select ' are no real performance issue. Field lists are nice to have, but difference is only considerable, if you reduce the width of the table dramatically, i.e.
it is enough if you check the very width tables.
And please to not introduce new select statements which deviate from others just in the definition of the field list.
The real performance issues are the indexes, or better the selects which have no proper index support.
Siegfried

Similar Messages

  • Code inspector with customer check : how to change the documentation ?

    Dear all,
    I've added a new control in code inspector with a new folder and I want to change the documentation to my new item line. Is there someone who know how to change this doc ?
    Christophe

    Hello Christophe,
    does control mean folder or check plugin? In this case the class you have introduced holds corresponsing callback methods.
    IF_CI_TEST~DISPLAY_DOCUMENTATION
    A redefinition of this method and setting the according member variable in the constructor should do..
    HAS_DOCUMENTATION = 'X'.
    Hope this helps
      Klaus

  • Integrating Code Inspector with Continious Integration Tools

    Hi everybody,
    outside the ABAP-world there is a large number of tools available, both commercial and open source, that support the continuous integration within software projects. One part of theses tools it to execute any available unit test after each commit to the source code. The code inspector (SCI) within SE80 basically can do something very similar. Run unit tests, check for coding conventions etc.
    I was wondering if the is a simple way to integrate the code inspector with existing tool, SAP external, continuous integration tools. I envision something like that after each transport or once per day SCI is executed and the results are made available in the external tool.
    Has anyone here ever done something like that? Are there any existing solutions available for it of the shelf?
    Thanks,
    Christian

    Hi
    please check the blog
    [/people/christian.drumm/blog/2009/12/30/continuous-integration-using-code-inspector|/people/christian.drumm/blog/2009/12/30/continuous-integration-using-code-inspector]
    and the discussion on the treads,
    [Is it possible to integrate the Code Inspector in Transport Management|Is it possible to integrate the Code Inspector in Transport Management]
    might be this helps
    Thanks,
    Jansi

  • PROBLEM WITH Select * from table_name with JDBC

    Hello,
    I am using thin driver. The problem that i am having is as
    follows.
    when i execute select * from any_table_name from within java
    code i only get FIRST row back. I am using Employee.java example.
    Is there something else i should do?
    Alex
    null

    Hi Alex,
    I am writing a client application with Java. Everything works
    really well, but - same problem as you had (I know, you solved it
    - that's why I'm writing :) - reading only first column. Actually
    it works fine on its own, but when embedded in my java app -
    that's when I get the first column displayed.
    Also executing "select * from emp;" gives me a sequence of
    numbers (displayed in columns) 20, 30, 30 etc, which are in fact
    present as one of the columns when running this query without
    java.
    I appreciate your help!
    Malgosia
    Alex Korneyev (guest) wrote:
    : Hello,
    : I am using thin driver. The problem that i am having is as
    : follows.
    : when i execute select * from any_table_name from within java
    : code i only get FIRST row back. I am using Employee.java
    example.
    : Is there something else i should do?
    : Alex
    null

  • Update table with select from another table

    Hallo,
    I'd like to update table b with codes from a mapping table a.
    a has:
    town_id, town_code, town_name
    b has town_code, town_id, town_population, town_zip_code,...
    Table a has all the details - town_id, town_code and town_name and acts as the mapping between town_id and town_code
    In table b, town_code is null. I want to update the column b.town_code with town_code from table a where a.town_id = b.town_id.
    How will the update query look like?
    I tried
    UPDATE B SET town_code = (SELECT A.town_code FROM A,B WHERE A.town_id=B.town_id)
    and I get the error 'single-row subquery returns more than one row'
    Will appreciate your assistance

    This is what I did.
    First, I created and populated the TOWN_INFO table:
    CREATE TABLE "TOWN_INFO"
    (     "TOWN_ID" NUMBER,
         "TOWN_CODE" NUMBER,
         "E_MAIL" CHAR(15 BYTE)
    Table Created.
    insert all
    into TOWN_INFO (TOWN_ID, E_MAIL) values (3024,'[email protected]')
    into TOWN_INFO (TOWN_ID, E_MAIL) values (3040,'[email protected]')
    into TOWN_INFO (TOWN_ID, E_MAIL) values (3052,'[email protected]')
    into TOWN_INFO (TOWN_ID, E_MAIL) values (3065,'[email protected]')
    into TOWN_INFO (TOWN_ID, E_MAIL) values (3066,'[email protected]')
    select * from dual
    5 rows created.
    The following creates and populates the mapping table:
    CREATE TABLE "TOWN_MAPP"
    (     "TOWN_CODE" NUMBER,
         "TOWN_ID" VARCHAR2(255 BYTE),
         "TOWN_NAME" CHAR(6 BYTE)
    insert all
    into TOWN_MAPP (TOWN_ID,TOWN_CODE, TOWN_NAME) values (3024,'1001','TOWN_1')
    into TOWN_MAPP (TOWN_ID,TOWN_CODE, TOWN_NAME) values (3040,'1003','TOWN_3')
    into TOWN_MAPP (TOWN_ID,TOWN_CODE, TOWN_NAME) values (3052,'1002','TOWN_2')
    into TOWN_MAPP (TOWN_ID,TOWN_CODE, TOWN_NAME) values (3065,'1004','TOWN_4')
    into TOWN_MAPP (TOWN_ID,TOWN_CODE, TOWN_NAME) values (3066,'1006','TOWN_6')
    into TOWN_MAPP (TOWN_ID,TOWN_CODE, TOWN_NAME) values (3088,'1007','TOWN_7')
    into TOWN_MAPP (TOWN_ID,TOWN_CODE, TOWN_NAME) values (3020,'1009','TOWN_9')
    select * from dual
    7 rows created.
    And now the update query:
    UPDATE TOWN_INFO
    SET TOWN_CODE=(SELECT B.TOWN_CODE FROM TOWN_MAPP B, TOWN_INFO C
    WHERE B.TOWN_ID=B.TOWN_ID)
    SET TOWN_CODE=(SELECT B.TOWN_CODE FROM TOWN_MAPP B, TOWN_INFO C
    ERROR at line 2:
    ORA-01427: single-row subquery returns more than one row
    Thanx in advance
    Edited by: user9954260 on Apr 13, 2010 7:40 AM
    Edited by: user9954260 on Apr 13, 2010 7:44 AM

  • Customizing the code inspector with check for two executable statements in same line

    Hi Everyone,
    I have a reuirement to customize the code inspector.I need to create a check 'Two executable statements should not be in the same line'.
    While doing so i am facing one problem as in internal table it is capturing the report as word by word with same row number nd different line number.
    If anyone have worked on this before then help me out.
    I am using CL_CI_TEST_SCAN as superclass and making the changes in the run method.
    Regards,
    Khushboo

    In the source code you will have this in comment right, use the "#EC ENHOK.

  • Inventory Management :Delta IP of BF runs with selection from Init IP of BF

    I have an init IP for BF DS which i ran with selection on posting date.
    I have another IP for delta for BF without any selection criteria.
    But, when i run the delta IP, it runs with the selection on posting date, the same value that i used for init.
    Even if i modify and clear the delta IP of any selection, and run it, it still runs with the selection.
    How do i rectify this.
    Thanks,

    that is the correct process. if u do init with some filters then those would be applied to Delta by default. u cannt remove those filters from delta. if u want to do it anyway u have to delete the last init request then the filters wodnt be applied. but in this case u have to rerun ur init again without any filters so that u can get delta.

  • Performance problem with select from _DIFF view

    Hi,
    we have a versioned table with more then one million records. We use the DBMS_WM.SetDiffVersions procedure and select from DIFF view to get data differences between two workspaces. The problem is that the select from the DIFF view is very slow. I takes more than 15 minutes. Has anybody an idea why it consumes so much time? Is there any way how to improve it?
    Thanks and regards
    Ondrej

    Hi,
    This can be due to any number of things, but is typically caused by an inefficient optimizer plan. Make sure that statistics on the _LT table have been recently analyzed.
    Also the following information would be useful:
    1. What is the relationship of the workspaces that you are trying to compare (parent/child, children of the same parent, etc) ?
    2. How many and of what type dml are being performed in the workspaces ?
    3. What version of Workspace Manager are you using and what is the version of the database ?
    4. What is the time needed to select from the _DIFF view based on the primary key ?
    Regards,
    Ben

  • Procedure with select from mysql db link problem

    Hi,
    first of all Oracle is new to me so if there are better ways to do this every suggestion would help.
    My problem is simple i cant use select from dblink inside a procedure.
    In Oralce SQL Developer 1.5.5:
    Im using oracle 11g and mysql 5.5.13 with mysql odbc 5.1
    in both db the user is root
    CREATE PUBLIC DATABASE LINK "MYSQL"
    CONNECT TO "root" IDENTIFIED BY "****"
    AUTHENTICATED BY "root" IDENTIFIED BY "****"
    USING 'mysql';
    select * from t1@mysql;
    run; -> result OK
    select "MAXID" from t1@mysql where "TNAME"='first';
    run; -> result OK
    create or replace
    PROCEDURE T1_IDS_PROC AS
    maxi number;
    BEGIN
    select "MAXID" into maxi from t1@mysql where "TNAME"='first';
    END T1_IDS_PROC;
    compile -> not working:
    Fehler(7,3): PL/SQL: SQL Statement ignored
    Fehler(7,47): PL/SQL: ORA-00904: "TNAME": unknown identifier
    How to solve this?

    Thanks for replay,
    yes the owner of the procedure can acces the remote table.
    I can use
    select count(*) into i from t1@mysql
    inside the procedure, but if i use specific columns inside the select i cant compile.
    Why i need double quote?
    I dont know if i need them but i read some tutorial for dblink to mysql and there was explanied
    Oracle use upercase names and Mysql is case sensitive for odbc 5.1 so i have to double qoute mysql names.
    But with or without double qoute it dont work inside procedures ;(

  • Help with select from USREXTID table

    HI,
    I try to select from table USREXTID and when i try to use do the select like below
    SELECT bname FROM usrextid
       INTO TABLE lt_bname
           WHERE type    = 'DN'
           AND extid     =  temp_extid
           AND status    = 'X'.
    here when i take the exact entry from the table i get sy-subrc = 0.
    Working o.k.
    when i try to use the select for SAML like
    SELECT bname FROM usrextid
       INTO TABLE lt_bname
             WHERE type      = 'SA'
               AND extid     =  temp_extid
               AND status    = 'X'.
    I get sy-subrc = 4.
    I have entry on the table with SA and i copy all the entry from EXTID field and put it on
    temp_extid ,
    What can be the problem ?
    Best Regards
    Nina
    Edited by: Nina C on Jun 15, 2009 10:05 AM

    HI,
    i copy the entry from the table exactly and i put it ,
    The problem here is with SA.
    when i copy entry from table with DN it work fine.
    it's behave strange .
    Best Regards
    Nina

  • How to select rowid with select * from table_name

    Hello guys i have a cursor like so.
      Cursor c1 IS SELECT * FROM FZRASST;
      -- Row of type FZRASST row
      fzrasst_row c1%ROWTYPE;when i try to reference the row id like this
    fzrasst_row.rowid;i get an error invalid indentifier? how can i reference the row id without implicitely selecting rowid? is this possible or do i need to change my select statement to select every column on the table?
    Any help would be greatly appreciated.

    Hi,
    mlov83 wrote:
    Hello guys i have a cursor like so.
    Cursor c1 IS SELECT * FROM FZRASST;
    -- Row of type FZRASST row
    fzrasst_row c1%ROWTYPE;when i try to reference the row id like this
    fzrasst_row.rowid;i get an error invalid indentifier? how can i reference the row id without implicitely selecting rowid? is this possible or do i need to change my select statement to select every column on the table?Fzrasst_row contains every column that is in the SELECT clause, and nothing more. If you want fzrasst_row to include pseudo-columns (such as ROWID) or anything else, then you have to include them in the SELECT clause.
    To avoid naming every single column in hte table, you can do something like this:
    Cursor c1 IS
        SELECT  FZRASST.*
        ,       ROWID   AS r_id
        FROM    FZRASST;(assuming the table doesn't already have a column called r_id).
    Edited by: Frank Kulash on Feb 13, 2012 3:29 PM

  • Produce a range of numbers with select from the gaps of ID column

    (1)
    Suppose I have a table t which has rows like this:
    A B
    2 4
    6 7
    I would like to use select to produce rows with numbers ranging between A column and B column inclusive
    for each row, like this:
    select ... from t ...
    2
    3
    4
    6
    7
    (2)
    Suppose I have ID column which has gaps, I would like to get lowest <N> available numbers between the gaps.
    I did research, and I can find the range of the gaps, but I cannot have the numbers listed individually, that is why
    I ask question (1). But is there a direct way to get the list instead of going through ranges and the list.
    For example, I have ID column which has
    2
    5
    6
    7
    9
    2000000
    I would like to get a select query that produces
    select ...
    3
    4
    8
    10
    11
    I have a way to get a list from 2 to 2000000 and then minus what we have to get all the
    gap numbers, but that is not efficient and could runs out of memory.
    PS: Before I post to this group, I did research already on "connect by", with recursive queries.

    First of all, I would like to thank jeneesh and Frank for helpful and correct reply. However, due to the a bug of this forum,
    when I mark jeneesh's reply as correct, I cannot mark Frank's reply as correct anymore. Therefore I would like to formally
    state here that I have tested both solutions and they are both correct. jeneesh and Frank use different approach, connect by
    and less join ( <=, I do not know what is the proper name for it ).
    Secondly I would like to report my small findings: use connect by, you control the level from 1 to the max number, so you
    do not need to use order by, and the performance is better (0.37 seconds version 0.92 seconds). And also it performs better
    if I use an intermediate view to limit the result sets. One line of code is worth one thousand words, now I am posting two
    versions of the code and highlighted the points I mentioned here.
    I am sorry that either I do not know how to format the code or I do not have the capability when posting on this forum.
    The code listing does not look good, but I hope you get the idea. I have "plain text" and I am not if I can use fixed width font
    and preserve space. After I used the spelling checker, it becomes double spaced and I have to manually delete the blank lines.
    /* I learned about { code } after the post and edited the original post */
    Thanks again to both jeneesh and Frank.
    "connect by" version:
    SQL> VARIABLE  new_id_cnt NUMBER
    SQL> EXEC        :new_id_cnt := 10;
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL> WITH my_table AS
      2  (
      3     SELECT num
      4     FROM   prs_elm
      5     WHERE  1=1
      6  )
      7  ,       my_num   AS
      8  (
      9  SELECT num, ct
    10  FROM   (
    11                    SELECT num AS num, LEAD(num) OVER (ORDER BY num) - num - 1 AS ct
    12                    FROM   ( SELECT 0 AS num
    13                             FROM   DUAL
    14                             UNION ALL
    15                             SELECT num
    16                             FROM   my_table
    17                             UNION ALL
    18                             SELECT ( MAX(num) + :new_id_cnt + 1 ) AS num
    19                             FROM   my_table
    20                    )
    21          )
    22  WHERE      ct >= 1
    23  AND         ROWNUM <= :new_id_cnt
    24  )
    25  SELECT     num + level AS available_id
    26  FROM       my_num
    27  WHERE      ROWNUM  <= :new_id_cnt
    28  CONNECT BY level <= ct
    29  AND        prior num = num
    30  AND        prior sys_guid() is not null
    31  ;
    AVAILABLE_ID
            3219
            3261
            3264
            3269
            3270
            3275
            3281
            3288
            3289
            3290
    10 rows selected.
    Elapsed: 00:00:00.37"Less join" version:
    SQL> VARIABLE  new_id_cnt NUMBER
    SQL> EXEC        :new_id_cnt := 10;
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL> WITH my_table AS
      2  (
      3     SELECT num
      4     FROM   prs_elm
      5     WHERE  1=1
      6  )
      7  ,       my_num   AS
      8  (
      9                    SELECT num AS num, LEAD(num) OVER (ORDER BY num) - num - 1 AS ct
    10                    FROM   ( SELECT 0 AS num
    11                             FROM   DUAL
    12                             UNION ALL
    13                             SELECT num
    14                             FROM   my_table
    15                             UNION ALL
    16                             SELECT ( MAX(num) + :new_id_cnt + 1 ) AS num
    17                             FROM   my_table
    18                    )
    19  )
    20  ,       my_cnt    AS
    21  (
    22          SELECT  LEVEL AS ct
    23          FROM    DUAL
    24          CONNECT BY    LEVEL <= :new_id_cnt
    25  )
    26  SELECT     available_id
    27  FROM
    28  (
    29          SELECT    n.num + c.ct AS available_id
    30          FROM      my_num n
    31          JOIN      my_cnt c  ON c.ct <= n.ct
    32          WHERE     n.ct >= 1
    33          ORDER BY  available_id
    34  )
    35  WHERE      ROWNUM  <= :new_id_cnt
    36  ;
    AVAILABLE_ID
            3219
            3261
            3264
            3269
            3270
            3275
            3281
            3288
            3289
            3290
    10 rows selected.
    Elapsed: 00:00:00.92PS: In Frank's code, there is a typo, <= should read as <.
    Edited by: PuraVidaOTN on 04-feb-2013 22:49
    What: To use tags to format the code.
    Edited by: PuraVidaOTN on 04-feb-2013 22:56                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Populate row of master detail form with selection from LOV?

    Hi Guys,
    Total noobe, Hope you can help me out with a project I am working on in Oracle Apex 4.1 with 11g XE
    I am sure this is a simple enough issue but I just can’t see the solution.
    I have a table called ‘STOCK’ this contains all new parts and delivery details.
    ‘STOCK_ID’ NUMBER PK
    ‘DELIVERY DATE ‘ DATE
    ‘PART’ VARCHAR2
    ‘PART_SN’ VARCHAR2
    ‘PART_AN’ VARCHAR2
    ‘INSTALLED’ CHECKBOX
    I have a table that list all the current physical locations of hardware for example
    ID, Till number, store location etc…
    I have an table to list the devices and modification to the hardware in these store locations.
    Move Date, Device, Device Serial number, Device Asset Number, Comments
    I have a report & form that displays all the current physical locations of hardware and a master detail form linked to this to add devices and modifications to each store location.
    I have a LOV setup on the Devices column that is based on a simple select query
    SELECT PART from STOCK
    ORDER BY 1
    This provides me the list of parts in the stock table.
    What I need to figure out is how do I get the data from the ‘STOCK’ table when I select a part in the LOV to auto populate ‘DEVICE_SN’ ‘DEVICE_AN’ in my master detail tubular form. this information is contained in the 'PART_SN' & 'PART_AN' columns of the STOCK table.
    I also need to figure out how to identify the part because by default the LOV only displays one column and I have no idea which part I am selecting other than by name. i could use a popup LOV and scan a barcode into the search box and get the retuen value to display the part name in the field.
    I also would like to reduce the number of records displayed in the LOV by using the ‘INSTALLED’ checkbox i.e. if checked this part has been used and will not be available for selection. The ‘PART_SN’ field can be duplicated as we often get the same part back again as a replacement after repair but this should be valaditated against i.e if the parts is ticked as installed and not available for selection in the list it can be added again this could possibly be validated based on the ‘DELIVERY DATE‘?
    I hope this make some sense to you guys if you need any further details let me know.
    Cheers
    Darren

    Hi,
    I am from the Oracle Forms background too and I have been using Oracle Apex for a while. Oracle Forms is just like client-server application although it uses the Forms servlet to render its Web front-end. I think...if you're really trying to develop true-Web application, you should try to forget such features as "master with many details" in Oracle Forms. Loading all the details in a single page will cause overheads anyway. When you discover more about ajax and such third-party javascript libraries as jquery and mootools, you'll have a different mind of Web development.
    Thanks.
    Andy

  • Problem with selecting from timestamp field for a particular date

    We're running 10g and we have a timestamp field whose values look like this:
    SQL> select timeinserted from files where rownum < 3;
    TIMEINSERTED
    16-APR-05 01.08.35.97634 PM
    16-APR-05 01.16.10.00419 PM
    SQL>
    I'm trying to run this query, but it returns no rows even though I know there should be some:
    select timeinserted from files where timeinserted = '27-MAY-05';
    I know I just need to somehow tell it to convert the timestamp to date or something like that. How should I rewrite this query? Thanks...

    select timeinserted from files where timeinserted = '27-MAY-05';
    this is poor coding, you compare a date with a varchar2. Not to mention using 2 digits years...
    try something like
    select timeinserted from files where timeinserted >= to_timestamp('27-MAY-2005', 'DD-MON-YYYY') and timeinserted<to_timestamp('28-MAY-2005', 'DD-MON-YYYY');

  • How to make htis code work with select options???

    REPORT YTEST.
    TABLES: MARA,MARC,MARD,MBEW,MVKE,MAKT.
    DATA: BEGIN OF I_MARC OCCURS 0,
    MATNR LIKE MARC-MATNR,
    EKGRP LIKE MARC-EKGRP,
    PSTAT LIKE MARC-PSTAT,
    DISPO LIKE MARC-DISPO,
    BESKZ LIKE MARC-beskz,
    END OF I_MARC.
    DATA: BEGIN OF I_MARD OCCURS 0,
    MATNR LIKE MARD-MATNR,
    LGORT LIKE MARD-LGORT,
    ERSDA LIKE MARD-ERSDA,
    WERKS LIKE MARD-WERKS,
    END OF I_MARD.
    DATA: BEGIN OF I_MBEW OCCURS 0,
    MATNR LIKE MBEW-MATNR,
    BWKEY LIKE MBEW-BWKEY,
    PEINH LIKE MBEW-PEINH,
    END OF I_MBEW.
    DATA: BEGIN OF I_MARA OCCURS 0,
    MATNR LIKE MARA-MATNR,
    MTART LIKE MARA-MTART,
    MATKL LIKE MARA-MATKL,
    MEINS LIKE MARA-MEINS,
    MBRSH LIKE MARA-MBRSH,
    BSTME LIKE MARA-BSTME,
    END OF I_MARA.
    DATA: BEGIN OF I_MVKE OCCURS 0,
    MATNR LIKE MVKE-MATNR,
    VKORG LIKE MVKE-VKORG,
    VTWEG LIKE MVKE-VTWEG,
    VRKME LIKE MVKE-VRKME,
    KONDM LIKE MVKE-KONDM,
    END OF I_MVKE.
    DATA: BEGIN OF I_MAKT OCCURS 0,
    MATNR LIKE MAKT-MATNR,
    SPRAS LIKE MAKT-SPRAS,
    MAKTX LIKE MAKT-MAKTX,
    END OF I_MAKT.
    DATA: BEGIN OF I_OUT OCCURS 0,
    MATNR LIKE MARC-MATNR,
    MEINS LIKE MARA-MEINS,
    MBRSH LIKE MARA-MBRSH,
    MATKL LIKE MARA-MATKL,
    MTART LIKE MARA-MTART,
    BSTME LIKE MARA-BSTME,
    WERKS LIKE MARD-WERKS,
    EKGRP LIKE MARC-EKGRP,
    PSTAT LIKE MARC-PSTAT,
    DISPO LIKE MARC-DISPO,
    BESKZ LIKE MARC-BESKZ,
    LGORT LIKE MARD-LGORT,
    ERSDA LIKE MARD-ERSDA,
    BWKEY LIKE MBEW-BWKEY,
    PEINH LIKE MBEW-PEINH,
    VKORG LIKE MVKE-VKORG,
    VTWEG LIKE MVKE-VTWEG,
    VRKME LIKE MVKE-VRKME,
    KONDM LIKE MVKE-KONDM,
    SPRAS LIKE MAKT-SPRAS,
    MAKTX LIKE MAKT-MAKTX,
    END OF I_OUT.
    select-options: s_matnr for marc-matnr.
    SELECT MATNR EKGRP PSTAT DISPO BESKZ FROM MARC INTO
    CORRESPONDING FIELDS OF TABLE I_MARC where matnr in s_matnr.
    SELECT MATNR MTART MATKL MEINS MBRSH BSTME FROM MARA INTO
    CORRESPONDING FIELDS OF
    TABLE I_MARA FOR ALL ENTRIES IN I_MARC
    WHERE MATNR EQ I_MARC-MATNR.
    SELECT MATNR SPRAS MAKTX FROM MAKT INTO
    CORRESPONDING FIELDS OF TABLE I_MAKT
    FOR ALL ENTRIES IN I_MARC
    WHERE MATNR = I_MARC-MATNR.
    SELECT MATNR LGORT ERSDA WERKS FROM MARD INTO
    CORRESPONDING FIELDS OF TABLE
    I_MARD FOR ALL ENTRIES IN I_MAKT
    WHERE MATNR = I_MAKT-MATNR.
    SELECT MATNR BWKEY PEINH FROM MBEW INTO
    TABLE I_MBEW
    FOR ALL ENTRIES IN I_MARD
    WHERE MATNR = I_MARD-MATNR.
    SELECT MATNR VKORG VTWEG VRKME KONDM FROM MVKE INTO
    TABLE I_MVKE
    FOR ALL ENTRIES IN I_MBEW
    WHERE MATNR = I_MBEW-MATNR.
    LOOP AT I_MARC.
    MOVE I_MARC-MATNR TO I_OUT-MATNR.
    MOVE I_MARC-EKGRP TO I_OUT-EKGRP.
    MOVE I_MARC-PSTAT TO I_OUT-PSTAT.
    MOVE I_MARC-DISPO TO I_OUT-DISPO.
    MOVE I_MARC-BESKZ TO I_OUT-BESKZ.
    READ TABLE I_MARA WITH KEY MATNR = I_MARC-MATNR.
    MOVE I_MARA-MTART TO I_OUT-MTART.
    MOVE I_MARA-MBRSH TO I_OUT-MBRSH.
    MOVE I_MARA-MEINS TO I_OUT-MEINS.
    MOVE I_MARA-MATKL TO I_OUT-MATKL.
    MOVE I_MARA-BSTME TO I_OUT-BSTME.
    READ TABLE I_MAKT WITH KEY MATNR = I_MARC-MATNR.
    MOVE I_MAKT-SPRAS TO I_OUT-SPRAS.
    MOVE I_MAKT-MAKTX TO I_OUT-MAKTX.
    READ TABLE I_MARD WITH KEY MATNR = I_MARC-MATNR.
    MOVE I_MARD-LGORT TO I_OUT-LGORT.
    MOVE I_MARD-ERSDA TO I_OUT-ERSDA.
    MOVE I_MARD-WERKS TO I_OUT-WERKS.
    READ TABLE I_MBEW WITH KEY MATNR = I_MARC-MATNR.
    MOVE I_MBEW-BWKEY TO I_OUT-BWKEY.
    MOVE I_MBEW-PEINH TO I_OUT-PEINH.
    READ TABLE I_MVKE WITH KEY MATNR = I_MARC-MATNR.
    MOVE I_MVKE-VKORG TO I_OUT-VKORG.
    MOVE I_MVKE-VTWEG TO I_OUT-VTWEG.
    MOVE I_MVKE-VRKME TO I_OUT-VRKME.
    MOVE I_MVKE-KONDM TO I_OUT-KONDM.
    APPEND I_OUT.
    CLEAR I_OUT.
    ENDLOOP.
    Loop at i_out.
    write:/ i_out-MATNR,
    i_out-EKGRP,
    i_out-PSTAT,
    i_out-DISPO,
    i_out-BESKZ,
    i_out-LGORT,
    i_out-ERSDA ,
    i_out-WERKS,
    i_out-BWKEY,
    i_out-PEINH,
    i_out-MTART,
    i_out-MATKL,
    i_out-MEINS,
    i_out-MBRSH,
    i_out-BSTME,
    i_out-VKORG,
    i_out-VTWEG,
    i_out-VRKME,
    i_out-KONDM,
    i_out-SPRAS,
    i_out-MAKTX.
    endloop.
    regards,
    sriram

    REPORT YTEST.
    TABLES: MARA,MARC,MARD,MBEW,MVKE,MAKT.
    DATA: BEGIN OF I_MARC OCCURS 0,
    MATNR LIKE MARC-MATNR,
    EKGRP LIKE MARC-EKGRP,
    PSTAT LIKE MARC-PSTAT,
    DISPO LIKE MARC-DISPO,
    BESKZ LIKE MARC-beskz,
    END OF I_MARC.
    DATA: BEGIN OF I_MARD OCCURS 0,
    MATNR LIKE MARD-MATNR,
    LGORT LIKE MARD-LGORT,
    ERSDA LIKE MARD-ERSDA,
    WERKS LIKE MARD-WERKS,
    END OF I_MARD.
    DATA: BEGIN OF I_MBEW OCCURS 0,
    MATNR LIKE MBEW-MATNR,
    BWKEY LIKE MBEW-BWKEY,
    PEINH LIKE MBEW-PEINH,
    END OF I_MBEW.
    DATA: BEGIN OF I_MARA OCCURS 0,
    MATNR LIKE MARA-MATNR,
    MTART LIKE MARA-MTART,
    MATKL LIKE MARA-MATKL,
    MEINS LIKE MARA-MEINS,
    MBRSH LIKE MARA-MBRSH,
    BSTME LIKE MARA-BSTME,
    END OF I_MARA.
    DATA: BEGIN OF I_MVKE OCCURS 0,
    MATNR LIKE MVKE-MATNR,
    VKORG LIKE MVKE-VKORG,
    VTWEG LIKE MVKE-VTWEG,
    VRKME LIKE MVKE-VRKME,
    KONDM LIKE MVKE-KONDM,
    END OF I_MVKE.
    DATA: BEGIN OF I_MAKT OCCURS 0,
    MATNR LIKE MAKT-MATNR,
    SPRAS LIKE MAKT-SPRAS,
    MAKTX LIKE MAKT-MAKTX,
    END OF I_MAKT.
    DATA: BEGIN OF I_OUT OCCURS 0,
    MATNR LIKE MARC-MATNR,
    MEINS LIKE MARA-MEINS,
    MBRSH LIKE MARA-MBRSH,
    MATKL LIKE MARA-MATKL,
    MTART LIKE MARA-MTART,
    BSTME LIKE MARA-BSTME,
    WERKS LIKE MARD-WERKS,
    EKGRP LIKE MARC-EKGRP,
    PSTAT LIKE MARC-PSTAT,
    DISPO LIKE MARC-DISPO,
    BESKZ LIKE MARC-BESKZ,
    LGORT LIKE MARD-LGORT,
    ERSDA LIKE MARD-ERSDA,
    BWKEY LIKE MBEW-BWKEY,
    PEINH LIKE MBEW-PEINH,
    VKORG LIKE MVKE-VKORG,
    VTWEG LIKE MVKE-VTWEG,
    VRKME LIKE MVKE-VRKME,
    KONDM LIKE MVKE-KONDM,
    SPRAS LIKE MAKT-SPRAS,
    MAKTX LIKE MAKT-MAKTX,
    END OF I_OUT.
    select-options: s_matnr for marc-matnr.
    SELECT MATNR EKGRP PSTAT DISPO BESKZ FROM MARC INTO
    CORRESPONDING FIELDS OF TABLE I_MARC where matnr in s_matnr.
    if i_marc[] is not initial.
    SELECT MATNR MTART MATKL MEINS MBRSH BSTME FROM MARA INTO
    CORRESPONDING FIELDS OF
    TABLE I_MARA FOR ALL ENTRIES IN I_MARC
    WHERE MATNR EQ I_MARC-MATNR.
    SELECT MATNR SPRAS MAKTX FROM MAKT INTO
    CORRESPONDING FIELDS OF TABLE I_MAKT
    FOR ALL ENTRIES IN I_MARC
    WHERE MATNR = I_MARC-MATNR.
    endif.
    if i_makt[] is not initial.
    SELECT MATNR LGORT ERSDA WERKS FROM MARD INTO
    CORRESPONDING FIELDS OF TABLE
    I_MARD FOR ALL ENTRIES IN I_MAKT
    WHERE MATNR = I_MAKT-MATNR.
    endif.
    if i_mard[] is not initial.
    SELECT MATNR BWKEY PEINH FROM MBEW INTO
    TABLE I_MBEW
    FOR ALL ENTRIES IN I_MARD
    WHERE MATNR = I_MARD-MATNR.
    endif.
    if i_mbew[] is not initial.
    SELECT MATNR VKORG VTWEG VRKME KONDM FROM MVKE INTO
    TABLE I_MVKE
    FOR ALL ENTRIES IN I_MBEW
    WHERE MATNR = I_MBEW-MATNR.
    endif.
    LOOP AT I_MARC.
    MOVE I_MARC-MATNR TO I_OUT-MATNR.
    MOVE I_MARC-EKGRP TO I_OUT-EKGRP.
    MOVE I_MARC-PSTAT TO I_OUT-PSTAT.
    MOVE I_MARC-DISPO TO I_OUT-DISPO.
    MOVE I_MARC-BESKZ TO I_OUT-BESKZ.
    READ TABLE I_MARA WITH KEY MATNR = I_MARC-MATNR.
    MOVE I_MARA-MTART TO I_OUT-MTART.
    MOVE I_MARA-MBRSH TO I_OUT-MBRSH.
    MOVE I_MARA-MEINS TO I_OUT-MEINS.
    MOVE I_MARA-MATKL TO I_OUT-MATKL.
    MOVE I_MARA-BSTME TO I_OUT-BSTME.
    READ TABLE I_MAKT WITH KEY MATNR = I_MARC-MATNR.
    MOVE I_MAKT-SPRAS TO I_OUT-SPRAS.
    MOVE I_MAKT-MAKTX TO I_OUT-MAKTX.
    READ TABLE I_MARD WITH KEY MATNR = I_MARC-MATNR.
    MOVE I_MARD-LGORT TO I_OUT-LGORT.
    MOVE I_MARD-ERSDA TO I_OUT-ERSDA.
    MOVE I_MARD-WERKS TO I_OUT-WERKS.
    READ TABLE I_MBEW WITH KEY MATNR = I_MARC-MATNR.
    MOVE I_MBEW-BWKEY TO I_OUT-BWKEY.
    MOVE I_MBEW-PEINH TO I_OUT-PEINH.
    READ TABLE I_MVKE WITH KEY MATNR = I_MARC-MATNR.
    MOVE I_MVKE-VKORG TO I_OUT-VKORG.
    MOVE I_MVKE-VTWEG TO I_OUT-VTWEG.
    MOVE I_MVKE-VRKME TO I_OUT-VRKME.
    MOVE I_MVKE-KONDM TO I_OUT-KONDM.
    APPEND I_OUT.
    CLEAR I_OUT.
    ENDLOOP.
    Loop at i_out.
    write:/ i_out-MATNR,
    i_out-EKGRP,
    i_out-PSTAT,
    i_out-DISPO,
    i_out-BESKZ,
    i_out-LGORT,
    i_out-ERSDA ,
    i_out-WERKS,
    i_out-BWKEY,
    i_out-PEINH,
    i_out-MTART,
    i_out-MATKL,
    i_out-MEINS,
    i_out-MBRSH,
    i_out-BSTME,
    i_out-VKORG,
    i_out-VTWEG,
    i_out-VRKME,
    i_out-KONDM,
    i_out-SPRAS,
    i_out-MAKTX.
    endloop.
    reward points to all helpful answers
    kiran.M

Maybe you are looking for

  • What is acceptable level of Private Interconnect Latency for RAC

    We have build 3 Node RAC on RHEL5.4 on VMware. There is node eviction problem due to loss of Network Heartbeat. ocssd.log:[    CSSD]2010-03-05 17:48:21.908 [84704144] >TRACE: clssnmReadDskHeartbeat: node 3, vm-lnx-rds1173, has a disk HB, but no netwo

  • ATV wont sync content back to itunes

    Hi all, Firstly I apologize if this topic has come up before but I couldn't find it. Anyway every time I buy something on ATV I cant get it onto my Mac. I have an I mac running with snow leopard and itunes 9.2. I have tried syncing and clicking trans

  • Safari on Leopard Crashes:  "Safari is missing important resources..."

    I installed Leopard, all was working, today I get: "Safari is missing important resources and should be reinstalled." Outside of the normal install, I installed all the optional stuff. I don't know if that contrbutes to the failure or not. The browse

  • Attachment transfer from SC to PO

    Hi Everyone, We have a requirement of transferring the attchments attched in SC to the PO or PR, i.e. to follow-on documents being created. We are using SRM 7.0. Can anyone pls guide what are th steps for that. Is it a customization or we need to cus

  • MAC MAIL IS CAUSING MY MAC TO RUN CONSTANTLY

    OK, I thought I would start a new thread on this problem I'm having because I think I have it narrowed down to Mac Mail being the culprit. I am noticing that every time I open mail, my Mac starts running it's guts out. The only way I can stop it is t