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

Similar Messages

  • 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

  • Customer Exit variable of Query not working in View

    Hi,
    I have a customer exit variable in my query to calculate the last 6 month period on Calendar month. I have used 0CMONTH for the same and then using offset of 6 on its value range to get it.
    Now, I have many views based on this query, which should ideally be having the same filter condition for the calendar month, but it is not happening. Although, it is working fine for the query! The views do not seem to be catching the selection correct.

    Hi there,
    As far as I Know, yes they exist. The only difference here, is that you build a query with a selection screen, and  you execute the query with some selection parameters, and therefore all customer exit variables, offsets, etc, will be read and changed at the runtime execution of the query, and you can rearrange your query visualization drilling down free char., making filters, etc. and storing that visualization in a view.
    If you save your view and execute it afterwards, you'll get the same selection parameters to input, the same offsets, etc, that you have with the query, but with a visualization stored by you.
    So that should have been working.
    Diogo.

  • Customer Exit - APOSC002 in APO not working as desired

    Hi Experts,
    Customer Exit - APOSC002 (function module EXIT_/SAPAPO/SAPLVCRM_002)
    Development logic is set in such a way that for a specific route (Maintained in transaction ZSC01), the departure calendar and Duration calendar is being filled to the fields CT_DURAS- TSTRID_DEP and CT_DURAS- TSTRID respectively.
    However the departure calendar is not taken into account when the departure date is calculated in the APO availability check.
    I have checked the exit and the values are filling correctly. But still the issue remains.
    If any of you has worked in this exit before, let me know how to resolve this?
    Thanks,
    Dinesh.

    Hi there,
    As far as I Know, yes they exist. The only difference here, is that you build a query with a selection screen, and  you execute the query with some selection parameters, and therefore all customer exit variables, offsets, etc, will be read and changed at the runtime execution of the query, and you can rearrange your query visualization drilling down free char., making filters, etc. and storing that visualization in a view.
    If you save your view and execute it afterwards, you'll get the same selection parameters to input, the same offsets, etc, that you have with the query, but with a visualization stored by you.
    So that should have been working.
    Diogo.

  • 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 for calweek is not working

    Hi,
    I have written a customer exit to derive calweek from a calday. But its not displaying the correct value.
    Can u please let me know if there is any error in the code.  The return value for calweek is a single value.
    CASE I_VNAM.
    WHEN 'zfclweek'.
    DATA : zday like sy-datum.
    IF I_STEP = 2.
          LOOP AT I_T_VAR_RANGE INTO L_S_VAR
          WHERE VNAM = 'ZFCLDAY'. ((ZFCLDAY  is also a customer exit to derive date and its working fine )
    ENDLOOP.
            zday = L_S_VAR-LOW .
            zday = zday + 1.  ( i need week of the next day of ZFCLDAY )
    CALL FUNCTION 'DATE_GET_WEEK'
            EXPORTING
              DATE               = zday
           IMPORTING
              WEEK               = xweek
          EXCEPTIONS
           DATE_INVALID       = 1
    OTHERS             = 2
          IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          l_s_range-low  = xweek.
          l_s_range-sign = 'I'.
          l_s_range-opt  = 'EQ'.
          append l_s_range to e_t_range.
    exit.
        endif.
        clear l_s_range.
        clear zday.
        clear xweek.
    endcase.

    Hi,
      I have changed my code as follows. But when i run the report its showing, "variable contains invalid values :
    please do me the needful.
    CASE I_VNAM.
    WHEN 'zfcweek'.   " it is a customer exit variable on calweek
    IF I_STEP = 2.
    LOOP AT I_T_VAR_RANGE INTO L_S_VAR
    WHERE VNAM = '0fper'.    " curent fiscal period
    endloop.
    YEAR = L_S_VAR-LOW+0(4) .
            PER = L_S_VAR-LOW+4(3).
            IF per = 01.
                 per = 12.
                 year = year - 1.
             else.
            PER = PER - 1.
            endif.
            CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'   " need to calculate first day of last fiscal period
              EXPORTING
                I_GJAHR              =  YEAR
                I_PERIV              = 'Z1'
                I_POPER              = PER
      I_MONMIT             = 00
             IMPORTING
               E_DATE               =   FDAY.
    EXCEPTIONS
      INPUT_FALSE          = 1
      T009_NOTFOUND        = 2
      T009B_NOTFOUND       = 3
      OTHERS               = 4
            IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
            ENDIF.
            CALL FUNCTION 'DATE_GET_WEEK'                  " to calculate the calweek of the first day of last fiscal period
            EXPORTING
              DATE               = FDAY
           IMPORTING
              WEEK               = xweek
           EXCEPTIONS
             DATE_INVALID       = 1
    OTHERS             = 2
          IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          l_s_range-low  = xweek .
          l_s_range-sign = 'I'.
          l_s_range-opt  = 'EQ'.
          append l_s_range to e_t_range.
        endif.
        clear l_s_range.
        clear year.
        clear fday.
        clear per.
    endcase.

  • 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

  • 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

  • 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

  • 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..

Maybe you are looking for

  • Transferring music from another itunes account to my new ipod classic

    Hi, first time posting. I have recently got an iPod classic for xmas and have transferred all my music off my laptop onto the device. However I am having issues trying to put another 5000 tracks off another laptop owned by someone else in my househol

  • How to get SlingScriptHelper in servlet?

    I need to get a SlingScriptHelper instance from within my servlet. Either a ComponentContext or BundleContext will do as well, as my only goal is to get sling services using it. Using SCR @Reference injection is not a solution for me, because I will

  • Firefox update won't work, re-install doesn't work, safe mode doesn't work, Not firewall / virus software

    I had Firefox v 16 or 17 on windows 7 A few weeks ago it told me to update, I did, and then it wouldn't load when I clicked on the icon I used system recovery to get back to the prior version. I just ignored the "update firefox" messages for a while.

  • Encore cs4 crashes upon creating a new file

    I recently purchased the Production Premium CS4 and when I try to run Encore or Premiere Pro, when I make a new file the program will quit and give me an Adobe crash submit screen.  I have tried chaging the sizes and types of the files I create, defr

  • How to enable /disable MWI ?

    Hi, I want to write a small application to enable/disable IP Phone lamp. But confused by how to enable MWI(Message Waiting indicator). TAPI ? AXL ? or some others , which can implement it . Could you give me some direction, thank you !