Select columns with offset from table

Hi All,
Is it possible to do a select query with using offset option for column name . I have tried a code but it dint pass the syntax check.
I am eager to know because I have seen this thread with similiar requirement but that dint work for me.
LINK: [Re: how to use offset in select query]
Has it got something to do with SAP version.
Best Regards,
Dep

Hi Sandra ,
I would also like to how could we acheive:
Select Ebeln+2(4)
          ebelp
          into table itab
          from ekpo
          up to 10 rows.
I am sorry I have asked it late and moderators kindly do take approriate action if needed for marking my question as solved and changing it again.
And I wish there were more 10 pointers ))
BR
Dep

Similar Messages

  • We can't add a decimal number column with the create table forms

    In the version 4, we can't add a decimal number column with the create table forms.

    In the GUI, I found the following column (I translate from french to english): PK, Name, Data_type, lenght, not null, default, comments.
    In the lenght field, if I enter 9,3 to have a NUMBER(9,3), I have a message saying that the number must be an integer.

  • How create report with data from table and some columns results function ?

    Hi,
    How can i create on apex report region with some columns (of the report) as returned from a table and the other columns as results of plsql functions ?
    for example , I want to create a report like that:
    device last_date error_msg stop/start
    kodak1 06/04/08 null >>
    kodak2 08/03/08 good msg --^--
    kodak3 08/04/08 err msg >>
    3 rows returned
    where the 3 first columns are data returned from the table and the forth column is the result of plsql function (returned for example false) and on that i want to display a button of start ( >> in this example ) or stop ( --^-- in this example)

    Thomas,
    There is no problem here -- this is fully suported scenario.
    1. Bind Table dataSource to Customers node.
    2. Bind individual cell editors to any attribute of customer or any nested node like Address, say create column with InputField as editor, then for "value" property select Customer.Address.Street.
    Your nested nodes (like Address) must be non-singleton, set singleton=false on context designer tab.
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

  • Issue with extractvalue from table with XMLTYPE column.

    I'm sure there is a simple answer but I am having problems
    retrieving data from an xmltype column type.
    I have two tables
    descr dab_xmlName
    TABLE of XMLTYPE
    descr dab_testName
    A NUMBER
    AB NUMBER
    DATA CLOB
    DATA2 VARCHAR2(1600)
    MYXML XMLTYPE
    I have inserted the Oracle example XML purchaseOrder.xml into both dab_xml
    and the myxml column in dab_test.
    When I run the following:
    SELECT extractvalue(OBJECT_VALUE, '/PurchaseOrder/Reference')
    FROM dab_xml;
    SBELL-2002100912333601PDT is returned
    When I run this:
    SELECT extractvalue(OBJECT_VALUE, '/PurchaseOrder/Reference')
    FROM (select myxml from dab_test);
    ERROR at line 1:
    ORA-00904: "OBJECT_VALUE": invalid identifier
    Why are the two different?
    Any help will be appreciated.
    Regards,
    David

    In short you want
    SELECT extractvalue(myxml, '/PurchaseOrder/Reference')
    FROM dab_test;This difference is that for dab_xml, there are no columns defined for the table, therefore you are [OBJECT_VALUE|http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/pseudocolumns006.htm#sthref830] as an alias for a non existent column.
    With dab_test, you have a column that contains the XML so you need to use that column name instead of OBJECT_VALUE.

  • How to make a field under Selection column in DataSource from dimmed to ...

    We try to make an InfoObject shows up in Data Selection of an InfoPackage to restrict the data load based on the range of this InfoObject.  In order to do this, we will have to go to the source system to run RSA6 to edit the datasource to make this field checked under the Selection column.  However when we get to the screen, find this field's Selection column is dimmed.  Is there anyway to make it from dimmed to editable that it can be checked?
    Thanks

    hi Kevin,
    try to check table ROOSFIELD, fill OLTPSOURCE with your datasource name and OBJVERS 'A', what's the value for SELECTION ? you may change the value with 'X'.
    use abap code :
    UPDATE ROOSFIELD SET   SELECTION = 'X'
                   WHERE OLTPSOURCE   = 'datasource name'   AND OBJVERS = 'A'.
    can i know your datasource name (if it's business content) ?
    Properties of a DataSource Field
    If a request for a DataSource is scheduled in the Business Information Warehouse, selection conditions are specified across certain fields. The property that determines whether a selection in BW using a field
    is possible or required is established in the DataSource in the Source System.
    In addition, the visibility of the field in BW can be set.
    A field that is not visible (or that is hidden) cannot be transferred into the transfer structure.
    Definition of the individual values:
    'A': Field is hidden in OLTP and BW, property cannot be changed  the customer.
    'M': The DataSource requires a selection across this field before it is able to extract data (Required field for the generation of a request); property cannot be changed by the customer
    'X': The Data Source can select across this field. The customer can change selections and visibility (the field is currently visible and selectable, compare with 'P', '3')
    '1': Pure selection field for the DataSource. The customer can change the selection, but not the visibility (the field is currently selectable , compare with '2').
    '2': Pure selection field for the DataSource. The customer can change the selection, but not the visibility (field is currently no selectable, compare with '1').
    '3': The DataSource can select across this field. The customer can change selection and visibility (the field is currently not visible not selectable, compare with 'P', 'X')
    '4': The DataSource cannot select across this field. The customer can change visibility (the field is currently not visible, compare with ' ')

  • Selecting Columns with User Defined Types... in PHP

    I've looked all over google and this forum and can't find anything about this... here's what I've got:
    a User Defined Type:
    CREATE TYPE "ADDRESS" AS OBJECT (
    ADDRESS VARCHAR2(256),
    COUNTRY VARCHAR2(256),
    STATE VARCHAR2(256),
    SUBURB VARCHAR2(256),
    TOWNCITY VARCHAR2(256)
    and it is used in a column in one of my tables:
    CREATE TABLE "SUPPLIERS" (
    "ID" NUMBER,
    "USER_ID" NUMBER,
    "NAME" VARCHAR2(50),
    "ADDRESS" "ADDRESS"
    so that column "address" is of type "address". I am then able to insert a row using:
    INSERT INTO "SUPPLIERS" VALUES(1,1,'name',ADDRESS('address','country','state','suburb','town city'));
    and that all works as expected. I can select the data using iSqlPlus and get the result I expect;
    ADDRESS('address', 'country', 'state', 'suburb', 'town city')
    So here's the problem. I cannot reterieve the data as expected, using PHP. If I make a select statement on the table that excludes the ADDRESS column I get the results as expected. If the ADDRESS column is included I get an error when fetching the row:
    ORA-00932: inconsistent datatypes: expected CHAR got ADT
    I'm assuming this is because the the cell cannot be cast to a string. How can I select the row so that the ADDRESS column is returned as an object? Can I even? If I can't, I don't see the use of Object Data Types... :(
    I have found that I can select a field of the type using:
    SELECT t.ADDRESS.TOWNCITY FROM SUPPLIERS t;
    But this is not ideal, because the whole idea was that I could (potentially) change the format for, in my example, an address, and not need to alter my SQL statements.
    Any ideas??

    PHP OCI8 can currently only bind simple types. Here are two possible
    solutions.
    -- cj
    create or replace type mytype as object (myid number, mydata varchar2(20));
    show errors
    create or replace type mytabletype as table of mytype;
    show errors
    create or replace procedure mycreatedata1(outdata out mytabletype) as
    begin
      outdata := mytabletype();
      for i in 1..10 loop
        outdata.extend;
        outdata(i) := mytype(i, 'some name'||i);
      end loop;
    end;
    show errors
    -- Turn the data into a ref cursor (but PHP OCI8 doesn't use prefetching for ref cursors)
    create or replace procedure mywrapper1(rcemp out sys_refcursor) as
    data mytabletype;
    begin
      mycreatedata1(data);
      open rcemp for select * from table(cast(data as mytabletype));
    end mywrapper1;
    show errors
    -- Turn the data into two collections
    -- This might be faster than returning a ref cursor because you can
    -- use oci_bind_array_by_name() on each parameter.
    create or replace procedure mywrapper2(pempno out dbms_sql.NUMBER_table, pename out dbms_sql.VARCHAR2_table) as
    data mytabletype;
    begin
      mycreatedata1(data);
      select myid, mydata
      bulk collect into pempno, pename
      from table(cast(data as mytabletype));
    end mywrapper2;
    show errorsThen in PHP you could do:
    // Use a Ref Cursor
    $s = oci_parse($c, "begin mywrapper1(:myid); end;");
    $rc = oci_new_cursor($c);
    oci_bind_by_name($s, ':myid', $rc, -1, OCI_B_CURSOR);
    oci_execute($s);
    oci_execute($rc);
    oci_fetch_all($rc, $res);
    var_dump($res);
    // Use Collections
    $s = oci_parse($c, "begin mywrapper2(:myid, :mydata); end;");
    oci_bind_array_by_name($s, ":myid", $myid, 10, -1, SQLT_INT);
    oci_bind_array_by_name($s, ":mydata", $mydata, 10, 20, SQLT_CHR);
    oci_execute($s);
    var_dump($myid);
    var_dump($mydata);

  • REUSE_ALV_GRID_DISPLAY - replacing the standard selection column with check

    I am attempting to replace the standard selection column (what you press to highlight an entire line) with a column
    of checkboxes using the REUSE_ALV_GRID_DISPLAY.  Which would mean that when you press on '(de)select all' that the
    checkboxes would behave accordingly.
    There is a 'box' field in the internal table and the layout is referencing it.  I have verified in debug that the
    '(de)select all' functionality is updating that field in the internal table.  When I add the 'box' field to the field
    catalog it will display on the screen but it does not show as ticked when '(de)select all' is pressed.  Again in debug
    the itab is being updated.
    I have been googling for a solution and found others with similar problems, but no useful solutions were provided.
    It is not an option to go with an ALV OO solution per the environment.  Thank you in advance.

    Hi Glen,
    If you are checking condition like whether it is select all or deselect all you can modify the internal for that fields as below
    if select all.
    itab-check = 'X'.
    modify itab where check = 'X' transporting check.
    endif.
    This will update all your itab-check coloumn with check indicator.
    This may be useful for you.
    Thanks,
    Manjunath M

  • How to select columns with null values

    HI
    In my table ‘A’ I have 10 columns and 30,000 records. I need all those columns whose value is null for all the records.
    For example in the below table column 'suffix' is null for all the records. So I want column suffix to be selected.
    Name Suffix Street
    James 1100 Washington street
    Richard 273 GEORGIA ST
    Arnold 3018 OAKHILL AVE
    MICHAEL 834 E 161ST ST
    Joseph 410 PINE AVE
    Thanks in advance

    True...
    But, i think here null needs to handle otherwise it will again throw some error like this ->
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Elapsed: 00:00:00.20
    satyaki>
    satyaki>
    satyaki>
    satyaki>SELECT owner, table_name, column_name
      2    FROM all_tab_cols
      3   WHERE data_type NOT IN ('BLOB', 'LONG', 'CLOB')
      4         AND dbms_xmlgen.getxmltype('select count('
      5                                    || CASE
      6                                          WHEN data_type NOT IN
      7                                                     ('BLOB', 'LONG', 'CLOB')
      8                                          THEN
      9                                             column_name
    10                                          ELSE
    11                                             '1'
    12                                       END
    13                                    || ') c from '
    14                                    || owner
    15                                    || '.'
    16                                    || table_name).EXTRACT (
    17               '//text()'
    18            ).getnumberval () = 0
    19         AND table_name IN
    20                  (SELECT table_name
    21                     FROM all_tab_privs
    22                    WHERE privilege = 'SELECT' AND USER IN (grantor, grantee));
    ERROR:
    ORA-19202: Error occurred in XML processing
    ORA-24347: Warning of a NULL column in an aggregate function
    ORA-06512: at "SYS.DBMS_XMLGEN", line 288
    ORA-06512: at line 1
    no rows selected
    Elapsed: 00:00:04.03
    satyaki>Or,
    satyaki>
    satyaki>
    satyaki>SELECT table_name, column_name
      2    FROM user_tab_cols
      3   WHERE data_type NOT IN ('BLOB', 'LONG', 'CLOB')
      4   AND   dbms_xmlgen.getxmltype('select count('
      5                               || CASE
      6                                    WHEN data_type NOT IN ('BLOB', 'LONG', 'CLOB') THEN
      7                                          column_name
      8                                    ELSE
      9                                      '1'
    10                                  END
    11                               || ') c from '||table_name).EXTRACT('//text()').getnumberval() = 0;
    AND   dbms_xmlgen.getxmltype('select count('
    ERROR at line 4:
    ORA-19202: Error occurred in XML processing
    ORA-24347: Warning of a NULL column in an aggregate function
    ORA-06512: at "SYS.DBMS_XMLGEN", line 288
    ORA-06512: at line 1
    Elapsed: 00:00:02.66
    satyaki>
    satyaki>Do you have any idea to resolve this issue in this context?
    Regards.
    Satyaki De.

  • Sending email with data from table

    Hi,
    I have search for many site but i didn't find any answer about this. How to send an email with a content from row of a table (I mean select a record from table and put in the email body and sent it)?
    Should i give some code here?
    Thanks

    Hi,
    This link has an example using utl_smtp package, [Sending email from the database with the Utl_Smtp package|http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/Utl_Smtp_Sample.html]. Also check this [utl_mail|http://www.psoug.org/reference/utl_mail.html]
    Regards,
    Edited by: Walter Fernández on Jul 14, 2009 12:29 AM - Adding other example...

  • Oracle 10g - issue with "DELETE from TABLE WHERE ID in (1,2,3)" (cfqueryparam used)

    Hello, everyone.
    I am having issues with running a DELETE statement on an Oracle 10g database.
    DELETE
    FROM tableA
    WHERE ID in (1,2,3)
    If there is only one ID for the IN clause, it works.  But if more than one ID is supplied, I get an "SQL command not properly ended" error message.  Here is the query as CF:
    DELETE
    FROM TRAINING
    WHERE userID = <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#trim(form.userID)#">
         AND TRAINING_ID in <cfqueryparam value="#form.trainingIDs#" cfsqltype="CF_SQL_INTEGER" list="yes">
    Anyone work with Oracle that can help me with this?  I'm an experienced MS-SQL developer; Oracle is new to me.
    Thanks,
    ^_^

    Nevermind.. a co-worker just told me that I still have to use parenthesis around the values for the IN clause. 

  • Hiding select column in LOV results table

    Is there a way to hide the select column easily in an LOV popup window? Right now I have a two column results area and it appears the LOV object dynamically adds a column of radio buttons in a column labeled SELECT and another column labeled QUICK SELECT. I wish to hid the SELECT column of radio buttons. It is not there when I look at the personalize link.
    So right now the only two columns I have in my LOV mappings are Pay Period and Check Number. The results table renders as:
    Select | Quick Select | Pay Period | Check Number |
    I want it to not show the SELECT column. Any ideas?
    Kris
    Edited by: Kristofer Cruz on Feb 26, 2013 12:30 PM

    Kris,
    Did you try changing the render property of the table region of the LOV ?
    Regards
    Sridhar

  • J2IUN Mismatch with query from table J_1IPART2

    Hi experts,
    If I run the TCODE J2IUN there is a marked difference for the RG23C register BED, AED, Cess, and HCess values that have been taken from table J_1IPART2 for the same period. What could be the cause for these differences and why did they occur or do I have to take addtional records from another table also. Well I am considering the Opening balances also.
    Please can you help me regarding this.
    Regards
    Yao Chhang

    You will have to first trace the difference. In the next step, go through J2IUN in debug mode with Abaper & check from where all the data is being picked. Next check whether all the data pick point are considered in Query.
    Regards,
    Rajesh Banka
    Reward suitable points.

  • How to select odd/even rows from table....

    How to select odd/even rows from a table?
    Please help.
    Edited by: vaibhav on May 7, 2012 5:30 AM

    just don't expect the results to come out in the sequence odd, even, odd, even .....
    The answer you have marked correct needs two order by clauses to guarantee that.
    The inner select will return rows in a random order, potentially different each time you run it. The outer select may not return rows in the same order as the inner one.

  • Problem in selecting object currency fields from table COSP and COSS

    Dear All,
    We are facing a issue while creating a virtual DataSource   for CCA plan from tables COSS and COSP.
    The issue is that we are able to activate the view by including the fields value in object currency ( WOG001 - WOG012 ) but not able  to create a DataSource   on the view.
    We are able to include the transaction currency value but as our application requires us to include the object currency fields.
    Error displayed:Invalid extract structure template .This operation failed, because the template structure quantity fields or currency fields, for example, field WOG001 refer to a different table.
    Any tips to resolve this issue would be valuable.
    Thanks in advance
    Rashmi Nair.

    HI,
    Can you see this thread.
    Re: How to display BAPI decimal values into webdynpro!
    Thanks
    nageswar

  • Selecting a single row from table control of standard transaction via repor

    Hi Experts,
    I have a requirement of selecting a single row from standard trasaction via ineractive report.
    For eg. for a given document number & item number, how can i select the specified item from transaction VA03.
    I am using call transaction to naviagate to the screen but unable to select the specified item.
    thanks in adavance for your Help.

    You mean selecting the item via BDC?
    Have you tried something like:
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBAP-POSNR(01)'.
    perform bdc_field       using 'RV45A-VBAP_SELKZ(01)'
                                  'X'.
    or whatever your dynpro is to select the first row?

Maybe you are looking for