Select Statement is not working

Hi All,
I am working on Master Data Text Datasource customer exit. Reading only restricted records using select statement if it is valid then those records move into I_T_DATA. If not they are not going to read.
I have written the following code .
Data : ls_rotextstr2 TYPE ROTEXTSTR2. '' Extrct Struct Name
*&Assigning values language and chart of accounts to variables
Data : lc_zspras TYPE SKAT-SPRAS VALUE 'E',
lc_Zktopl TYPE SKAT-KTOPL VALUE 'GCOA',
lc_zsaknr TYPE SKAT-SAKNR.
LOOP AT I_T_DATA INTO ls_rotextstr2.
gi_tabix = SY-TABIX.
SELECT SINGLE SPRAS KTOPL SAKNR FROM SKAT INTO
(lc_zspras, lc_Zktopl, lc_zsaknr)
WHERE SPRAS = lc_zspras
AND KTOPL = lc_Zktopl.
IF SY-SUBRC EQ 0.
MODIFY I_T_DATA FROM ls_rotextstr2.
ENDIF.
ENDLOOP.
Here select statement reading all records like other than 'EN" and 'GCOA' and going to Subrc condition.
Please some one take a look at the programme and tell me where I am making mistake. I just want the records that are language = 'EN' and Chart of Accounts = 'GCOA'.
Your suggestions are very help full to me,
Thanks
Ganesh.

Hi,
Try this..
types : begin of s,
spras type skat-spras,
ktopl type skat-ktopl,
saknr type skat-saknr,
end of s.
data i_t_data type standard table of s with header line.
Data : ls_rotextstr2 TYPE ROTEXTSTR2. " Extrct Struct Name
*&Assigning values language and chart of accounts to variables
Data : lc_zspras TYPE SKAT-SPRAS VALUE 'E',
lc_Zktopl TYPE SKAT-KTOPL VALUE 'GCOA',
lc_zsaknr TYPE SKAT-SAKNR.
*gi_tabix = SY-TABIX.
SELECT SPRAS KTOPL SAKNR FROM SKAT INTO
table i_t_data
WHERE SPRAS = lc_zspras
AND KTOPL = lc_Zktopl.
Edited by: Kamini Rawat on Mar 19, 2008 5:56 AM

Similar Messages

  • SELECT statement does not work if characters ## are contained in field

    Hi Experts,
    I have the following statement:
    select single field1
        from table1
        into var1
        where field2 = text.
    This is a very simple statement that is working for me almost always correct. However there is a situation where the system is not able to find the record in my table. If text is equal to JAN##2011 the system won't deliver a result even if I have an entry in table1 with exactly this value.
    TABLE1
    field1 field2
    rome JAN##2011
    paris JAN2011
    only if text is JAN2011 the select will find a result.
    all fields are defined as CHAR.
    Thanks in advanced

    Hi Alberto,
    probably ## is not ## :-).
    is the visible representation used by ABAP to show any non-displayable characters as control characters like TAB, CR, LF, FF and the like.
    In debugger you can switch to HEX display of values, if you see something like 0A0D you can find this using CL_ABAP_CHAR_UTILITIES constant attributes.
    Regards
    Clemens

  • Customer Exit  ---  Select statement is not working

    Hi All,
             I am working on Master Data Text Datasource customer exit. Reading only restricted records using select statement if it is valid then those records move into I_T_DATA. If not they are not going to read.
           I have written the following code .
    Data : ls_rotextstr2 TYPE ROTEXTSTR2. '' Extrct Struct Name
    *&Assigning  values language and chart of accounts to variables
    Data : lc_zspras     TYPE SKAT-SPRAS VALUE 'E',
           lc_Zktopl     TYPE SKAT-KTOPL VALUE 'GCOA',
           lc_zsaknr     TYPE SKAT-SAKNR.
    LOOP AT I_T_DATA INTO ls_rotextstr2.
    gi_tabix = SY-TABIX.
    SELECT SINGLE SPRAS KTOPL SAKNR FROM SKAT INTO
    (lc_zspras, lc_Zktopl, lc_zsaknr)
    WHERE SPRAS = lc_zspras
    AND   KTOPL = lc_Zktopl.
    IF SY-SUBRC EQ 0.
    MODIFY I_T_DATA FROM ls_rotextstr2.
    ENDIF.
    ENDLOOP.
    Here select statement reading all records like other than 'EN" and 'GCOA' and  going to Subrc condition.
    Please some one take a look at the programme and tell me where I am making mistake. I just want the records that are language = 'EN' and Chart of Accounts = 'GCOA'.
    Your suggestions are very help full to me,
    Thanks
    Ganesh.

    Hi,
    Apply the following changes :
    Data : ls_rotextstr2 TYPE ROTEXTSTR2. '' Extrct Struct Name
    Data : lc_zspras TYPE SKAT-SPRAS VALUE 'E',
    lc_Zktopl TYPE SKAT-KTOPL VALUE 'GCOA',
    lc_zsaknr TYPE SKAT-SAKNR.
    LOOP AT I_T_DATA INTO ls_rotextstr2.
    gi_tabix = SY-TABIX.
    SELECT SINGLE SPRAS KTOPL SAKNR FROM SKAT INTO
    (lc_zspras, lc_Zktopl, lc_zsaknr)
    WHERE SPRAS = lc_zspras
    AND KTOPL = lc_Zktopl.
    IF SY-SUBRC NE 0.
    DELETE I_T_DATA INDEX gi_tabix.
    CONTINUE.
    ENDIF.
    ENDLOOP.
    hope it works...
    regards,
    Raju

  • Select statement inside a select statement is not working as thought it would.

    Hi all,
    I have problem in the following programming code:
    SELECT ACCT_FD_NO,ACCT_CUST_CODE, STAUS, FDR_STAUS, AMOUNT,INT_RATE ,MATURITY_DATE,(AMOUNT*(INT_RATE/100)/365)no_of_days,
    (AMOUNT*(INT_RATE/100)/365)*((TO_DATE(:X_PRM_ST_DT)-TO_DATE(:X_PRM_YR_END_DT)))tot_int FROM KEC_FDACCT_MSTR
    WHERE acct_type NOT  IN(1,2,3,4,5,6,13,14,15,16,17,18,25,26,27,28,29,30) AND FDR_STAUS='R' AND STAUS='E'
    AND  ACCT_OPN_DT>:X_PRM_YR_END_DT
    AND ACCT_FD_NO IN(SELECT OLD_FDR_NO FROM KEC_FDACCT_MSTR WHERE FDR_STAUS='R' AND acct_type NOT  IN(1,2,3,4,5,6,13,14,15,16,17,18,25,26,27,28,29,30)
    AND  ACCT_OPN_DT>:X_PRM_YR_END_DT);
    The following is the Table KEC_FDACCT_MSTR with the columns shown with data.
    ACCT_FD_NO
    ACCT_CUST_CODE
    ACCT_TYPE
    ACCT_OPN_DT
    FDR_STAUS
    STAUS
    AMOUNT
    INT_RATE
    GROUP_TYPE
    OLD_FDR_NO
    MATURITY_DATE
    250289
    3
    25
    07/12/2012
    R
    E
    140,000.00
    11.50
    12MNS
    60002
    06/12/2013
    250290
    3
    25
    07/12/2012
    R
    E
    140,000.00
    11.50
    12MNS
    60001
    06/12/2013
    270968
    4
    27
    14/07/2013
    M
    E
    450,000.00
    12.50
    36MNS
    30227
    13/07/2016
    330516
    9
    33
    08/12/2012
    R
    E
    50,000.00
    12.50
    36MNS
    90001
    07/12/2015
    320217
    11
    32
    08/12/2012
    R
    E
    50,000.00
    12.00
    24MNS
    90002
    07/12/2014
    330513
    12
    33
    08/12/2012
    R
    E
    100,000.00
    12.50
    36MNS
    90003
    07/12/2015
    360017
    13
    36
    01/12/2012
    R
    E
    50,000.00
    12.50
    36MSH
    120002
    30/11/2015
    360018
    15
    36
    05/12/2012
    R
    E
    100,000.00
    12.50
    36MSH
    120004
    04/12/2015
    270743
    22
    27
    09/12/2012
    R
    E
    50,000.00
    12.50
    36MNS
    30004
    08/12/2015
    270744
    22
    27
    09/01/2013
    R
    E
    200,000.00
    12.50
    36MNS
    30112
    08/01/2016
    270316
    25
    27
    07/12/2012
    R
    E
    70,000.00
    12.50
    36MNS
    30007
    06/12/2015
    360019
    29
    36
    05/12/2012
    R
    E
    100,000.00
    12.50

    This is the table on which i'm writing the code:
    ACCT_FD_NO
    ACCT_CUST_CODE
    ACCT_OPN_DT
    FDR_STAUS
    STAUS
    AMOUNT
    INT_RATE
    OLD_FDR_NO
    SAP_CODE
    MATURITY_DATE
    350001
    743
    17-Nov-10
    M
    D
    200000
    12.00
    323055
    16-Nov-12
    350002
    734
    18-Nov-10
    R
    D
    300000
    12.00
    100018
    323055
    17-Nov-12
    350003
    736
    19-Nov-10
    R
    D
    150000
    12.00
    100015
    323055
    18-Nov-12
    350004
    737
    20-Nov-10
    R
    D
    500000
    12.00
    100016
    323055
    19-Nov-12
    350005
    735
    19-Nov-10
    M
    D
    150000
    12.00
    323055
    18-Nov-12
    350006
    738
    20-Nov-10
    M
    D
    1500000
    12.00
    323055
    19-Nov-12
    350007
    734
    19-Nov-10
    R
    D
    200000
    12.00
    100013
    323055
    18-Nov-12
    350008
    83
    30-Nov-10
    M
    D
    50000
    12.00
    323055
    29-Nov-12
    350009
    136
    12-Dec-10
    R
    D
    200000
    12.00
    100006
    323055
    11-Dec-12
    350010
    716
    12-Nov-11
    M
    D
    200000
    12.00
    323055
    11-Nov-13
    350011
    746
    16-Nov-12
    R
    E
    200000
    12.00
    120054
    323055
    15-Nov-14
    350012
    731
    13-Nov-12
    R
    E
    400000
    12.00
    290001
    323055
    12-Nov-14
    350013
    3,906
    10-Sep-13
    N
    E
    100000
    12.00
    323055
    9-Sep-15
    350014
    3,907
    18-Sep-13
    N
    E
    50000
    12.00
    323055
    17-Sep-15
    360001
    811
    4-Oct-10
    M
    D
    100000
    12.50
    323056
    3-Oct-13
    360002
    535
    7-Oct-10
    P
    D
    10000000
    12.50
    323056
    6-Oct-13
    360003
    527
    7-Oct-10
    M
    D
    4000000
    12.50
    323056
    6-Oct-13
    360004
    54
    19-Oct-10
    M
    D

  • Insert statement will not work if select statement has less number of colum

    Hi,
    One of my thread is already resolved on the following URL : unable to insert rows into the table
    DROP TABLE TEMP;
    CREATE TABLE TEMP AS SELECT * FROM CASE_101 WHERE 1=2;
    DECLARE
    S VARCHAR2(200);
    STMT VARCHAR2(500);
    begin
    for C in (select TABLE_NAME INTO S from USER_TABLES where TABLE_NAME like 'CASE%' TABLE_NAME NOT like '%OLD' and Num_ROWS > 0 order by TABLE_NAME) loop
    STMT := 'INSERT INTO TEMP SELECT * FROM ';
    STMT:=STMT || C.TABLE_NAME;
    EXECUTE IMMEDIATE STMT;
    dbms_output.put_line(c.table_name);
    end loop;
    end;
    i am facing now some different; almost all the tables have same number of columns except in few of tables have some additional columns. As above i am creating a table "TEMP" who has highest column temp(by doing some manual process). The table who has less columns than "TEMP" table : Insert statement will not work. 'INSERT INTO TEMP SELECT * FROM less_columns_table_name'.
    Please let me know , how can i execute proper way.
    Thanks.
    Best Regards
    Arshad

    user13360241 wrote:
    Hi,
    One of my thread is already resolved on the following URL : unable to insert rows into the table
    DROP TABLE TEMP;
    CREATE TABLE TEMP AS SELECT * FROM CASE_101 WHERE 1=2;
    DECLARE
    S VARCHAR2(200);
    STMT VARCHAR2(500);
    begin
    for C in (select TABLE_NAME INTO S from USER_TABLES where TABLE_NAME like 'CASE%' TABLE_NAME NOT like '%OLD' and Num_ROWS > 0 order by TABLE_NAME) loop
    STMT := 'INSERT INTO TEMP SELECT * FROM ';
    STMT:=STMT || C.TABLE_NAME;
    EXECUTE IMMEDIATE STMT;
    dbms_output.put_line(c.table_name);
    end loop;
    end;
    i am facing now some different; almost all the tables have same number of columns except in few of tables have some additional columns. As above i am creating a table "TEMP" who has highest column temp(by doing some manual process). The table who has less columns than "TEMP" table : Insert statement will not work. 'INSERT INTO TEMP SELECT * FROM less_columns_table_name'.
    Please let me know , how can i execute proper way.
    Thanks.
    Best Regards
    Arshadmore often than not "TEMP" tables are NOT required & are highly inefficient in Oracle.
    Either only specify explicit column in TEMP to get data,
    or provide value for "extra" column in TEMP

  • CASE Statement is not working Derived table

    Hi All,
    in the bello SQL Statement case statement is not working in derived table. I am new to creation of derived table if any body knows plz kinldy help me out on this.
    SELECT x.market, x.droprate as med1
    FROM
    (select upper(market_name) as market, fulldate as date_value,
         (sum([Dy_LOT_DROPS_N][Dy_OB_HO_DROPS][Dy_NonRF_Drop]))/
              nullif(sum(CASE WHEN (month(BBHDLY.FullDate)}>= 6 and { year(BBHDLY.FullDate)} = 2011) or {fn year(IDENSLABBHDLY.FullDate)} > 2011
    THEN  BBHDLY.Dy_Calls - BBHDLY.Dy_HO_CHAN_ALLOC ELSE BBHDLY.Dy_Calls END),0)*100 as droprate
    from BBHDLY sla
    inner join Dim mkt
         on sla.bts_name = mkt.bts_name and sla.SectorID = mkt.Sector_Id
                   where fulldate >= GETDATE()-46
                   group by market_name, fulldate) x,
    (select market_name as market, fulldate as date_value,
    (sum([Dy_LOT_DROPS_N][Dy_OB_HO_DROPS][Dy_NonRF_Drop]))/
              nullif(sum(CASE WHEN ({fn month(BBHDLY.FullDate)}>= 6 and {fn year(BBHDLY.FullDate)} = 2011) or {fn year(BBHDLY.FullDate)} >
    2011 THEN  BBHDLY.Dy_Calls - BBHDLY.Dy_HO_CHAN_ALLOC ELSE BBHDLY.Dy_Calls END),0)*100 as droprate
    from BBHDLY sla
    inner join Dim mkt
         on sla.bts_name = mkt.bts_name and sla.SectorID = mkt.Sector_Id
                   where fulldate >=GETDATE()-46
                   group by market_name, fulldate) y
    where x.market = y.market
    GROUP BY x.droprate, x.market
    HAVING
       SUM(CASE WHEN y.droprate <= x.droprate
          THEN 1 ELSE 0 END)>=(COUNT(*)+1)/2 AND
       SUM(CASE WHEN y.droprate >= x.droprate
          THEN 1 ELSE 0 END)>=(COUNT(*)/2)+1
    Thanks

    It looks like SQL Server or Sybase given that you're using getdate().
    As such, Vinesh's comment to use decode is wrong - decode is  Oracle syntax.
    Looking at your statement again, I've noticed the following:
    you have no { to match the first } - not sure why you're using them anyway.
    you haven't given x.market a name - use x.market as market instead
    use coalesce instead of nullif if you're on SQL Server.

  • Delete Statement is not working correctly

    Hello,
    The following delete statement is not working correctly.
    If I press delete it will delete everything in the category table
    I don't know whats wrong with it.
    ----delete row from category if there is not infrastructure to support------
    IF :P12_DFCY_SEQNO4 IS NOT NULL AND :P12_DFCY_CATG_C = '7' THEN
    DELETE FROM DFCY_CATG
    WHERE NOT EXISTS(SELECT I.DFCY_SEQNO
    FROM DFCY_CATG C, DFCY_CATG_INFRSTRCTR I
    WHERE C.DFCY_SEQNO = I.DFCY_SEQNO
    AND :P12_DFCY_SEQNO4 = I.DFCY_SEQNO);
    end if;
    Thanks
    Mary

    Hi,
    IF :P12_DFCY_SEQNO4 IS NOT NULL AND :P12_DFCY_CATG_C = '7' THEN
    DELETE FROM DFCY_CATG
    WHERE NOT EXISTS(SELECT I.DFCY_SEQNO
    FROM DFCY_CATG C, DFCY_CATG_INFRSTRCTR I
    WHERE C.DFCY_SEQNO = I.DFCY_SEQNO
    AND :P12_DFCY_SEQNO4 = I.DFCY_SEQNO);
    end if;So, if P12_DFCY_SEQNO4 does not exist, then I would expect all records to be deleted because the NOT EXISTS() function would just return TRUE for every record on the table. Somewhere in the statement, I would expect to see something that links between the table being deleted from and the NOT EXISTS() data or, perhaps, using the P12_DFCY_CATG_C value as a filter?
    Andy

  • Select query is not working in BDC Program

    Hi,
    I am working in BDC for update valuation class for T-code mm01.Actually In this BDC i am using two recoding based on material type.
    i am using two internal table : I_DATA and ITAB
    Use I_DATA to hold excle data in which material No, plant , valuation type , valuation No. and ITAB for material No, material type Only.
    So, i am fetching material Type ( MARA-MTART ) through select query. But Select query is not working. and also i did check MARA table according that  Material Number then  material no. exit in Mara Table.
    Note : at run time  I_DATA have 1 row but ITAB have 0 row ....
    DATA: BEGIN OF I_DATA OCCURS 0,
    MATNR TYPE MARA-MATNR,
    WERKS TYPE MARC-WERKS,
    BWTAR TYPE RMMG1-BWTAR,
    VERPR TYPE BMMH1-VERPR,
    BKLAS TYPE MBEW-BKLAS,
    STATUS TYPE C,
    END OF I_DATA.
    DATA : BEGIN OF ITAB OCCURS 0,
    MATNR LIKE MARA-MATNR,
    MTART LIKE MARA-MTART,
    END OF ITAB.
    Loop at I_DATA.
    select matnr mtart from mara into table itab where matnr = I_DATA-matnr.
    endloop.
    Guide me..........

    If you use your
    Loop at I_DATA.
      select matnr mtart from mara into table itab
        where matnr = I_DATA-matnr.
    endloop.
    At end of loop, itab will only contain the result of the last select, so use a
    Loop at I_DATA.
      select matnr mtart from mara APPENDING table itab
        where matnr = I_DATA-matnr.
    endloop.
    better
    if I_DATA[] is not initial.
      select matnr mtart from mara into table itab
        FOR ALL ENTRIES IN i_data where matnr = i_data-matnr.
    endif.
    Some Remarks
    - If actually required (where does I_DATA come from, is it an external format, you need the internal value to use in SELECT statement), check via SE11 the correct [conversion exit|http://help.sap.com/saphelp_nw04/helpdata/en/35/26b217afab52b9e10000009b38f974/content.htm] associated with domain MATNR (Is it truly ALPHA, and not something like MATN1, so [CONVERSION_EXIT_MATN1_INPUT|http://www.sdn.sap.com/irj/scn/advancedsearch?query=conversion_exit_matn1_input])
    - You could try to use BAPI like [BAPI_MATERIAL_SAVEDATA|http://www.sdn.sap.com/irj/scn/advancedsearch?query=bapi_material_savedata] and not BDC
    Regards,
    Raymond

  • Extension in Select-Options is not working

    Hi,
    The extension of select-options is not working for the following statement........
    SELECTION-SCREEN: BEGIN OF BLOCK sel WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_tp_no FOR e070-trkorr.
    SELECTION-SCREEN: END OF BLOCK sel.
    Please Help.......
    Thanks,
    Sheel

    SELECTION-SCREEN: BEGIN OF BLOCK sel WITH FRAME TITLE text-001.
    SELECTION-SCREEN: END OF BLOCK sel.
    Remove the colan ':' from ur code after SELECTION-SCREEN
    write it as
    SELECTION-SCREEN BEGIN OF BLOCK sel WITH FRAME TITLE text-001.
    SELECTION-SCREEN END OF BLOCK sel.

  • Select() function is not working properly in solaris 10.

    Hi ,
    We are facing an issue with select() in Solaris 10. we had written a sample program to this issue.
    Program name :- sel.cpp
    int main()
    struct timeval sleeptime;
    sleeptime.tv_sec = 60;
    printf("1\n");
    select(0,NULL,NULL,NULL,&sleeptime);
    printf("2");
    return 0;
    When i run this program in Solaris 9, its printing 1 and after one minute its printing 2.
    When i run this program on Solaris 10, its printing 1 and 2 without waiting for 60 seconds.
    When i tried to print tv_usec, its printing as 0 in solaris 9 and some garbage values in solaris 10.
    I think because of that the above select function is not working properly in solaris 10.
    Why the tv_usec is not taking 0 as default values in Solaris 10?
    We are using our legacy code for past 20 years. So, before going to do any changes we are trying to find why this happenig like this.
    Thanks a lot.
    Regards,
    Srikanth.

    haisrig wrote:
    Hi ,
    We are facing an issue with select() in Solaris 10. we had written a sample program to this issue.
    Program name :- sel.cpp
    int main()
    struct timeval sleeptime;
    sleeptime.tv_sec = 60;
    printf("1\n");
    select(0,NULL,NULL,NULL,&sleeptime);
    printf("2");
    return 0;
    When i run this program in Solaris 9, its printing 1 and after one minute its printing 2.
    When i run this program on Solaris 10, its printing 1 and 2 without waiting for 60 seconds.
    When i tried to print tv_usec, its printing as 0 in solaris 9 and some garbage values in solaris 10.
    I think because of that the above select function is not working properly in solaris 10.
    Why the tv_usec is not taking 0 as default values in Solaris 10?
    We are using our legacy code for past 20 years. So, before going to do any changes we are trying to find why this happenig like this.Hi
    It sounds to me that you've been lucky for 20 years then.
    Local POD variables on the stack that aren't explicitly initialized can contain any value. Here's what I see in your app with dbx
    (dbx) run
    Running: sel
    stopped in main at line 9 in file "sel.cpp"
        9      sleeptime.tv_sec = 60;
    (dbx) print sleeptime
    sleeptime = {
        tv_sec  = -4198732
        tv_usec = 0
    }That's on a Solaris 10 SPARC machine. If I try it on a Solaris 10 x86 box then I get
    (dbx) print sleeptime
    sleeptime = {
    tv_sec = -830490588
    tv_usec = 134510556
    and I see the behaviour that you describe.
    Paul

  • Insert statement is not working for z table.

    Hi experts,
    My insert statement is not working.
    I have used follwing code to update z table .
    INSERT ztable FROM TABLE gt_table.
    here i have checked gt_table and its filled up with all the records properly.
    now the problem is in this table i have 15 fields and it inserts 14  fields of it but
    the last field is never inserted though in gt_table i can see value for last fields also.
    I have added this field in ztable recently . so i also used se14 to adjust table but still i am facing same problem.
    please help me out.
    thanks,
    Neo

    > > Table maintainance will have nothing to do with
    > this
    > > issue.
    >
    > It does sometimes when you are trying to see the
    > values from SM30 instead of SE16. The value may be
    > there, but it may just not seen in SM30 because the
    > table maintenance hasn't registered the addition of
    > new field.
    >
    > Another place to look at is the activation log to see
    > if there are any warnings issued there.
    You shouldn't use SM30 to view table entries. You use this transaction to maintain the table entries. Pure and Simple.

  • Delete statement is not working.

    Hi,
    find the code. Here the delete statement is not working and i am getting sy-subrc = 4. although ,
    xe1edp10-idnkd = 34596 and dint_edidd -sdata = 34596.
    please help me ...
    loop at dekek_x.
    loop at dint_edidd where segnam = 'E1EDP10'.
    if dekek_x-stpin = 1 .
    CLEAR xe1edp10.
      MOVE dint_edidd-sdata TO xe1edp10.
    delete dint_edidd where sdata = xe1edp10-idnkd.
    endif.
    endloop.

    1st thing..
    i tried this :
    tables: edidd, e1edp10.
    edidd-sdata = '315934 EA 017'.
    WRITE edidd-sdata.
    move edidd-sdata to e1edp10.
    IF edidd-sdata = e1edp10-idnkd.
    WRITE: e1edp10-idnkd.
    else.
      WRITE: 'nothing'.
    ENDIF.
    output
    >315934 EA 017
    >315934 EA 017
    2nd thing,.
    your loop inside loop doesnt make any sense as they are not related any where.
    3rd thing:
    the fields are not type compatible.. this might be the reason for wrong delete statement..
    and 1 more clarification:
    TABLES: edidd, e1edp10.
    DATA :it TYPE TABLE OF edidd WITH HEADER LINE.
    edidd-sdata = '315934 EA 017'.
    WRITE edidd-sdata.
    APPEND edidd TO it.
    edidd-sdata = '315934 EA 018'.
    APPEND edidd TO it.
    LOOP AT it." where segnam = 'E1EDP10'.
      CLEAR e1edp10.
      MOVE it-sdata TO e1edp10.
      DELETE it WHERE sdata = e1edp10-idnkd.
    ENDLOOP.
    in this also delete is working perfectly fine... you run and check..

  • SORT statement is not working!

    Hi frdz,
    Below SORT statement is not working. Can any one explain me why this is happening.
    SORT i_bseg ASCENDING BY belnr bukrs
                        DESCENDING kunnr.
    I have table content as below.
    BELNR      BUKRS KUNNR   
    0016000000|CROP |         
    0016000000|CROP |0008910168
    Before and after the sort content order is same.
    I want to sort the content like below.
    0016000000|CROP |0008910168
    0016000000|CROP |       
    Is there any thing wrong with the sort statement???
    i_bseg is defined as TYPE STANDARD TABLE OF
    Sort criteria must not change i. e ascending by belnr and bukrs and descending by kunnr.
    Thanks,
    Vinod.

    hi vinod,
    this is because on your statement, you are sorting BUKRS in descending order and KUNNR in ASCENDING order.
    please take note that the sort order should come after the sorted field. if no order is given, the default which is ASCENDING will be used.
    do your sorting like this
    SORT i_bseg BY belnr bukrs kunnr DESCENDING.
    regards,
    Peter

  • Select button will not work

    My 2gb nano's select button will suddenly not work. The rest of the clickwheel and buttons work find, but not the center select button.
    I restored it to original settings. Then after it restarts, you have to select a language. The select button would still not work, but then I slid the "hold" button back and forth and the select button worked to allow me to chose a language. But at the next screen of options (Music/Photos/Extras, etc.) the select button will again not work. Sliding the hold button back and forth doesn't work. I cannot do a menu+select reset because I can't get the select button to respond.
    I have made sure that I have the most updated softward for the nano.
    Any suggestions?

    My select button has not worked for a loong time.. It will occasionally work if I press for long enough or hard enough.. but not very often. This seems to be a common enough problem so there should be a way to fix it..I hope..

  • Why select query is not working?

    CREATE OR REPLACE TYPE prod_type AS OBJECT (
    pid INT,
    pprice NUMBER,
    MEMBER PROCEDURE display(pid IN NUMBER));
    create table prod of prod_type (pid primary key);
    CREATE OR REPLACE TYPE deal_type UNDER prod_type (
    ctr NUMBER,
    OVERRIDING MEMBER PROCEDURE display (pid IN NUMBER),
    insert into prod values(deal_type(101, 4, 1));
    insert into prod values(deal_type(102, 5, 0));
    ------below given select query is NOT WORKING ---------
    select ctr from prod p where p.pid=101;
    Thanks,
    -Nid

    ------below given select query is NOT WORKINGWondering how you inserted data ...
    SQL> CREATE OR REPLACE TYPE prod_type AS OBJECT (
      2  pid INT,
      3  pprice NUMBER,
      4  MEMBER PROCEDURE display(pid IN NUMBER));
      5  /
    Type created.
    SQL>
    SQL> create table prod of prod_type (pid primary key);
    Table created.
    SQL>
    SQL> CREATE OR REPLACE TYPE deal_type UNDER prod_type (
      2  ctr NUMBER,
      3  OVERRIDING MEMBER PROCEDURE display (pid IN NUMBER),
      4  );
      5  /
    Warning: Type created with compilation errors.
    SQL> sho err
    Errors for TYPE DEAL_TYPE:
    LINE/COL ERROR
    4/1      PLS-00103: Encountered the symbol ")" when expecting one of the
             following:
             , not pragma <an identifier>
             <a double-quoted delimited-identifier> final instantiable
             current order overriding static member constructor map
    SQL> CREATE OR REPLACE TYPE deal_type UNDER prod_type (
      2  ctr NUMBER,
      3  OVERRIDING MEMBER PROCEDURE display (pid IN NUMBER));
      4  /
    Warning: Type created with compilation errors.
    SQL> sho err
    Errors for TYPE DEAL_TYPE:
    LINE/COL ERROR
    1/1      PLS-00590: attempting to create a subtype UNDER a FINAL type
    SQL>You made an attempt to create a subtype UNDER a FINAL type - that the reason why can not work ...
    Avoid deriving a subtype from this FINAL type.
    HTH

Maybe you are looking for

  • How to disable buttons in Search help screen ?

    Hi All, How do we disable Print button in customer search help ? We want that nobody should be able to take a printout of Customers from Search help result. Hence we want to disable the print button which comes in Search help. Any idea how do we go a

  • Reinstalled entire computer. Need Acrobat XI Pro back. Where do I download?

    Hi there. I had to reinstall everything on my computer, and therefore I also need to reinstall Acrobat XI Pro again. I got a key.no. but can't find a link where I can download the program without having to purchase it again. Someone please help.

  • Need help in saving an animation

    I created a simple animation in Photoshop CS3 using just two frames. I have never tried animating anything before so if this question sounds stupid, it's just because after a couple hours of exploring every how-to on how to save and export, I am comi

  • Leading zeroes - switching off ALHPA conversion doesn't work

    Hi all. I have an IObj ZPARENT with compounding attribute ZATTR. While loading data into ZPARENT I got errors regarding duplicate records. Errors occur because I got leading zeroes in ZATTR and records like "1", "01", "001" become "0001" . I thought

  • HT204053 App Store / Apple ID update

    My old Apple ID is coming up at the App Store and making hard for me to make purchases. When I went to Apple, I was being treated like I lost my ID. I just quit what I was doing. It was frustrating. How do I change my ID at the App Store?