Select query is correct or not

hai to all iam software trainee in core java
i have doubt on select query please give gudiance
select * from StudentDetails where Admnno=' "
i connected my application with ms-access db using jdbc-odbc
my question is i want retrieve data from ms-access so i use this select query is it correct or not
because
select * from StudentDetails this query working but it's working with where condition please help and try to understand my question
In advanced
thanks

("select * from StudentDetails where Admnno ='' "+Admnno+"'")Is Admnno a numeric or character field? Either way, that syntax looks wonky.
For a numeric field:("select * from StudentDetails where Admnno = " + Admnno)and for a character field("select * from StudentDetails where Admnno = '" + Admnno + "'")db
Use code tags to post codes -- [code]CODE[/code] will display asCODEOr click the CODE button and paste your code between the tags that appear.

Similar Messages

  • Select query failing to return all values

    So I've just completed my first batch insert into DocumentDB and ran into the following irregularity while verifying my documents were added correctly.  I am seeing this issue through the Portal Query Explorer and the Python SDK.
    I have found 4 id values that are in my collection, but won't get returned in a Select all type query.  
    Queries I've used to select just that item/document.  These work correctly and return my document.  Therefore, I assume the document is in the collection.
    SELECT * FROM Matches m WHERE m.id = "2997"
    SELECT VALUE m.id FROM Matches m WHERE m.id = "2997"
    However, when doing a broader SELECT query, some ids are not returned.
    SELECT * FROM Matches
    SELECT VALUE m.id FROM Matches m
    Neither of the above queries return the document with id "2997".  I've three other ids where this is the case.
    Am I missing something obvious here, or is there a bug?  I've added all ~991 documents into the collection using the same batch program.
    Edit:  Here's a test program I've drawn up to show this issue (you can take my word for it that the clients are initialised correctly):  https://gist.github.com/Fitzpasd/1dde776b00eacf68b361
    And this prints:
    1
    991
    False
    False
    False
    True

    I also have some issues with pages. When I execute a simple query like:
    SELECT x FROM Root x
    or 
    SELECT s FROM Root x JOIN s IN x.Children
    (The Children array contains more than 100 items)
    And I use the AsDocumentQuery() method in the c# API, iterating through the pages works fine (the continuation token is returned in the request)
    But when I execute the following query:
    SELECT s FROM Root x JOIN s IN x.Children WHERE x.id = "<guid>"
    the continuation token is not returned so I can't get to the next pages.
    Is this related to the same bug ?

  • Runtime error(Time limit exceeds)after executing select query

    Dear experts, whenever i executing the select query in this zprogram i am getting runtime error that time limit exceeds.i am using inner join and into table.after that also i am geetting error. how can i resolve it??
    SELECT LIKP~VBELN LIKP~WADAT_IST LIKP~VEHICLE_NO LIKP~TRNAME
              LIKP~VEHI_TYPE LIKP~LR_NO LIKP~ANZPK LIKP~W_BILL_NO
              LIKP~SEALNO1                                       " Seal NO1
              LIKP~SEALNO2                                       " Seal NO2
              LIPS~LFIMG
              VBRP~VBELN VBRP~VGBEL VBRP~MATNR VBRP~AUBEL VBRP~FKIMG
              VBAK~AUART
              VBRK~FKART VBRK~KNUMV VBRK~FKSTO
              FROM LIKP INNER JOIN LIPS ON LIKP~VBELN EQ LIPS~VBELN
                        INNER JOIN VBRP ON LIKP~VBELN EQ VBRP~VGBEL
                        INNER JOIN VBAK ON VBRP~AUBEL EQ VBAK~VBELN
                        INNER JOIN VBRK ON VBRP~VBELN EQ VBRK~VBELN
              INTO TABLE  I_FINAL_TEMP
              WHERE LIKP~VSTEL = '5100' AND
                 LIKP~WADAT_IST IN S_WADAT  AND
                    VBRP~AUBEL IN S_AUBEL AND
                    VBAK~AUART IN ('ZJOB','ZOR') AND
                    VBRK~FKART IN S_FKART AND
    *               VBRK~FKART IN ('ZF8','ZF2','ZS1') AND
                    VBRK~FKSTO NE 'X'.
    When I am debugging the select query.the cursor will not go to next step.after 15-20 minutes i am getting runtime error(time limit exceeds).
    how can i resolve it for that scenario??

    Looks like whole SD flow you trying to fetch in single query
    First you check the database statistic of these table are upto date in system ( Check with basis team )
    if this query was working fine earlier.
    Most of table involved are huge volume tables which queried with any primary key
    Any secondary index on created for LIKP on VSTEL WADET ?
    My suggestion would be split the selection queries and make use of primary or existing secondary index to fetch the desired result if possible. For testing purpose split the queries and find which is taking more time and which needs index by taking squel trace in ST05.
    Also take ST05 trace of this query in debugger ( New debugger -> special tool -> trace > ST05/SE30)

  • Select query in not working for Count(*)

    Hi,
    Our batch team running one query that is selecting one table TSFHEAD and this query is hanging. Below are diffrent shenario in which the select query is running on this table.
    select * from tsfhead where create_id = 'BATCH' and create_date = '26-OCT-12';
    --not returning any rows and hanging
    select * from tsfhead where create_id = 'BATCH' ---returning rows
    select * from tsfhead where create_date = '26-OCT-12'; --- returning rows
    select count(*) from tsfhead ----not returning rows and hanging
    This table TSFHEAD has 59000 rows.
    SQL> explain plan for select * from tsfhead where create_id = 'BATCH' and create_date = '26-OCT-12';
    Explained.
    SQL> SELECT * FROM TABLE(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 415503093
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 67 | 215 (1)| 00:00:03 |
    |* 1 | TABLE ACCESS FULL| TSFHEAD | 1 | 67 | 215 (1)| 00:00:03 |
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
    1 - filter("CREATE_ID"='BATCH' AND "CREATE_DATE"='26-OCT-12')
    I don't know why this query behaving in this manner.Please help.

    RanVijai_dba wrote:
    Thanks for your reply. But +"select count(*) from tsfhead"+ is hanging and +"select * from tsfhead where create_date = '26-OCT-12' "+ is showing records.It might be showing records, but not necessarily the correct records.
    As sb points out, you are treating dates as strings rather than the DATE datatype. That means you could be querying the wrong data, and your query is also not safe in different environments. It could also effect the query execution plan. Also, as pointed out, you should be ideally using 4 digit years. There were many headaches caused by the use of 2 digit years that most companies corrected as part of the millenium bug fixes prior to the year 2000... well over a decade ago, and most good designs now ensure that 4 digit years are used as standard.
    So your query would be better written as:
    select * from tsfhead where create_date = TO_DATE('26-OCT-2012','DD-MON-YYYY')When you say:
    select count(*) from tsfhead... is hanging, you say the table has around 59000 rows in it, and in reality that's a small amount of records, so a count(*) shouldn't take long at all, even doing a full table scan.
    Post the explain plan for that simple count(*) query for us. (and ensure you use {noformat}{noformat} tags to keep the formatting on the forum, as described in {message:id=9360002})                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • 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

  • CF9 Problems with Select * query, resulting in Value can not be converted to requested type.

    So, I work on a legacy CF web site and there are numerous SELECT * FROM USERS_TABLE queries all over the site.
    Well, we changed the structure of said table in the database on our Testing and Staging sites, with no issues.
    When we pushed up to our production environment and changed the structure of the production DB table, the server kept kicking back "Value can not be converted to requested type."
    After doing some searching out there, it looks like CF caches the structure of the table, and you either have to restart CF to clear it, or rename and then name-back the DSN to fix the issue.
    http://www.bennadel.com/blog/194-ColdFusion-Query-Error-Value-Can-Not-Be-Converted-To-Requ ested-Type.htm
    That said, this doesn't happen in our testing and staging environments - so what would be the difference?
    Is there some setting I need to change in the CF Admin to keep this from happening again?

    Also, if you can use a Stored Procedure to retrieve the data, do so.  Standard queries gets all the information, anyway, chokes bandwidth passing it all to the CF server, and forces the CF server to filter, sort, and format the data.  SPs tell the db server to get ONLY the data requested, and forces the db server to filter and sort the data, leaving only formatting to the CF server.
    That's not true. The only time CF messes with data returned from the DB is if there's a maxrows attribute, and the record set returnded from the DB has more than that number of records... which causes CF to truncate the recordset to the correct size before returning it. The DB might or might not stop sending rows down to CF after CF says "yeah, I've got all I want now".
    Other than that, for all intents and purposes all CF does with the SQL is pass it to the DB and wait for an answer. The only thing it does to the returned data is to create a CF record set ("query") with it... this does not involve any filtering and sorting.
    Adam

  • Select query is not executing

    Hi Friends,
    my code is :
    itab-vbeln = bseg-vbeln.
    if not itab-vbeln is initial.
    select single vbeln inco1 inco2 into ( itab-vbeln itab-inco1 itab-inco2)
    from vbrk where vbeln = itab-vbeln.
    appned itab.
    note : here inco1 inco2 are incoterms
    my question is  can we direct move the values of bseg-vbeln into itab-vbeln. ???
    and i am generating the report with one varient , when i debug this report the
    there is no value in bseg-vbeln. it is showing null value.thats why my select query is not working..but i want execute this select query final.
    in output i want display the inco1 inco2 data.(incoterms)
    any help please.
    urgent.
    regards,
    vijay.

    Hi Vijay,
    First you need to check it out whether <b>itab-vbeln = bseg-vbeln</b> is in with in LOOP or not (<b>if ITAB is intenal table</b>)
    if itab is internal table you should write above statement with in loop, and also check it out in debug mode why bseg-vbeln value is not coming.
    and one more thing you need to make small correction in ur code use ',' .
    select single vbeln inco1 inco2 into ( <b>itab-vbeln, itab-inco1, itab-inco2</b>)
    from vbrk where vbeln = itab-vbeln
    Note: when ever use select single u should pass values into work area, dont use internal table .
    <b>if you have more doubts just send your entire code then i will rewrite it.</b>
    <b>Reward with points if useful.</b>
    Regards,
    Vijay Krishna

  • : "Invalid object name '#Temp'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

     Hi   .
        I was creating the  pass the values t in temp tables  though s sis package vs2012 .
      First I was taken on executive SQL TASK.
     IN EXCUTIVE SQL TASK  . I was write the stored proce:
    Sp;
    reate  procedure  USP_GETEMP2333
    AS
    begin
    Select  eid,ename,dept,salary from emp
    end;
    create table #temp(eid int,ename varchar(20),dept varchar(20),salary int)
      insert into #temp
       exec USP_GETMP02333
       go.
     It was executive correctly.
     I was taken another sequence container. In the sequence container iam creating one   executive  sql
    In 2<sup>nd</sup> excutive sql task: sql statements is
    if object_id('emp_fact_sal') is not null
     drop table emp_fact_sal
    select eid,ename as emp_name,sal_bar=
    case when salary<=5000 then 'l'
    when salary >5000 and salary<=7000 then 'm'
    else
    'h'
    end
    into emp_fact_sal from #temp.
     and one falt flies  it was taken to designation .
     iam changing  all  connection properties:
     in oldeb connection:
    in excutive sal task properties .
    delay validation is true,
    and retain connection maner is also true,
    and package mode is 64 bit is false.
     But iwas excutive in 2<sup>nd</sup> excutive ql task .
    Iam getting this type of errors,
                    [Execute SQL Task] Error: Executing the query " if object_id('emp_fact_sal') is not null
     drop ta..." failed with the following error: "Invalid object name '#Temp'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established
    correctly.
     Please help me

    Arthur suggestion works but you shouldnt even be doing this on a SQL Task.
    Use a data flow task. You'll have better control over the data that is being transfered and get better performance because no staging table will be used.
    Just because there are clouds in the sky it doesn't mean it isn't blue. But someone will come and argue that in addition to clouds, birds, airplanes, pollution, sunsets, daltonism and nuclear bombs, all adding different colours to the sky, this
    is an undocumented behavior and should not be relied upon.

  • Select query is working on oracle 10.1.0 but its not working in 10.2.0

    select query is working and retrieving some data from oracle database server 10.1.0.2.0, but same query is not working in 10.2.0.1.0 database server, its throws(ORA-00942: table or view does not exist)
    But schema related tables and relevant details are same in 10.2.0.1.0 database server, so don't think that table is missing on that schema.
    Note: Query length is upto 480 line
    I have validate all the things, everything is fine, i don't why that query is not executing in different version.
    I am in helpless in this situation?, anybody faced this issue?
    Thanks in advance

    Validated means all the tables and and columns are verified, i just running in sqlprompt,
    Say for example:
    sql> select * from table1;
    One thing i observed while executing the query its showed error in one location of select sql. i mean particular word in select sql.
    After that i combined some three lines of huge select sql into single then i am getting error in different location i mean different word...
    My question is how same query executing in Oracle 10g Release 1, same dump (its exported from Release1) imported into oracle 10g release 2 is not executing. its shows Table or view doesn't exit.

  • Due to MODIF ID, SELECT query in START-OF-SELECTION not getting triggered

    Dear SAP Gurus,
    I'm stuck with this program, where, my program is not being executed, as in, my SELECT query in my event START-OF-SELECTION is not getting triggered. Since i hav used MODIF ID, for SELECT-OPTIONS, even after putting the entries in select-options...................when i click on the execute button, or press F8, the program still goes into the AT SELECTION-SCREEN OUTPUT event..........but i want it to goto START-OF-SELECTION event where my SELECT query is........what should i do??????????????
    Please find the notepad file having the code, n exucse me for any selection-texts absence.
    Need help from u in this issue.
    Thanks in advance.
    REPORT  ZPPR_CONVSTAT NO STANDARD PAGE HEADING.
    INCLUDE ZPPR_CONVSTAT_TOP.               " data declaration
    INCLUDE ZPPR_CONVSTAT_SEL_CRITERIA.      " selection criteria
    INCLUDE ZPPR_CONVSTAT_PBO.               " event at selection-screen output
    INCLUDE ZPPR_CONVSTAT_START_SELECTION.   " event start-of-selection
    INCLUDE ZPPR_CONVSTAT_F_START_OF_SEL.
    *&  Include           ZPPR_CONVSTAT_TOP
    TABLES  : VBUK,
              VBUP,
              VBAK,
              VBAP,
              VBEP,
              VBPA,
              TVAK,
              EKUB,
              LIKP,
              LIPS,
              MARA,
              MAKT,
              MARC,
              PLAF,
              AUFK,
              AFKO,
              AFPO,
              AFVC,
              AFVV,
              CRHD,
              PBIM,
              KNA1,
              T134,
              IOHEADER,
              IOITEM.
    TYPE-POOLS  : slis.
    TYPES : BEGIN OF ty_final,
            werks   TYPE vbap-werks,  "Plant
            auart   TYPE vbak-auart,  "Sales Order Doc. type
            erdat   TYPE vbak-erdat,  "Sales Order Creation date
            vbeln   TYPE vbak-vbeln,  "Sales Order No.
            posnr   TYPE vbap-posnr,  "Sales Order Item No.
            aedat   TYPE vbak-aedat,  "Sales Order Change Date
            kwmeng  TYPE vbap-kwmeng, "Sales Order qty.
            vdatu   TYPE vbak-vdatu,  "Requested Delivery Date
            lfimg   TYPE lips-lfimg,  "Sales Order Delivered Qty.
            matnr   TYPE vbap-matnr,  "Material ID
            arktx   TYPE vbap-arktx,  "Material Description
            strgr   TYPE marc-strgr,  "Planning Strategy
            vrkme   TYPE vbap-vrkme,  "UOM
            plnum   TYPE plaf-plnum,  "Plan Order No.
            gsmng   TYPE plaf-gsmng,  "Plan Order Qty.
            auffx   TYPE plaf-auffx,  "Plan Order Firming Indicator u2013 Qty.
            stlfx   TYPE plaf-stlfx,  "Plan Order Firming Indicator - Component
            erdat2  TYPE aufk-erdat,  "Production Order Creation Date
            aufnr   TYPE aufk-aufnr,  "Production Order No.
            prdqty  TYPE afko-gamng,  "Production Order qty.
            pckqty  TYPE lips-lfimg,  "Packed Delivered Qty.
            psamg   TYPE afpo-psamg,  "Allotted scrap
            igmng   TYPE afko-igmng,  "Confirmed Yield Qty.
            iasmg   TYPE afko-iasmg,  "Confirmed Scrap Qty
            iamng   TYPE afpo-iamng,  "Expected Yield
            wemng   TYPE afpo-wemng,  "Delivered Qty.
            altscrp TYPE c LENGTH 6,  "Allotted Scrap %
            actscrp TYPE c LENGTH 6,  "Actual Scrap %
            umrez   TYPE afvv-umrez,  "Ups (from Prd. ORD)
            ups     TYPE clobjdat-ausp1,  "Ups (from Material Master)
            crtnstl TYPE clobjdat-ausp1,  "Carton Style
            ppopr   TYPE clobjdat-ausp1,  "Pre-Printing Operation
            brdtyp  TYPE clobjdat-ausp1,  "Board Type
            lsdim1  TYPE clobjdat-ausp1,  "Layout Size u2013 Dim 1
            lsdim2  TYPE clobjdat-ausp1,  "Layout Size u2013 Dim 2
            lsgsm   TYPE clobjdat-ausp1,  "GSM
            inktyp  TYPE clobjdat-ausp1,  "Ink Type
            foiltyp TYPE clobjdat-ausp1,  "Foiling
            wintyp  TYPE clobjdat-ausp1,  "Window Type
            lamin   TYPE clobjdat-ausp1,  "Lamination
            fsvrnsh TYPE clobjdat-ausp1,  "Front Side Varnish
            bsvrnsh TYPE clobjdat-ausp1,  "Back Side Varnish
            emboss  TYPE clobjdat-ausp1,  "Embossing
            punch   TYPE clobjdat-ausp1,  "Punching
            paste   TYPE clobjdat-ausp1,  "Pasting
            oprno   TYPE afvc-vornr,      "Operation No.
            wrkcntr TYPE crhd-arbpl,      "Work Centre
            oprtxt  TYPE afvc-ltxa1,      "Operation Text
            oprqty  TYPE afvv-mgvrg,      "Operation qty.
            yield   TYPE afvv-lmnga,      "Yield
            scrap   TYPE afvv-xmnga,      "Scrap
            jobtyp  TYPE vbak-augru,      "Job Type
            prordst TYPE bsvx-sttxt,      "Production Order Status
            solinst TYPE vbup-lfsta,      "Sales Order Line Item Status
            sldprty TYPE kna1-name1,      "Sold to Party Name
            shpprty TYPE kna1-name1,      "Ship to Party Name
            shpcity TYPE kna1-ort01,      "Ship to party - City
            END OF  ty_final.
    TYPES : BEGIN OF ty_vbak,
            auart   TYPE vbak-auart,
            erdat   TYPE vbak-erdat,  "Doc creation date
            vbeln   TYPE vbak-vbeln,
            aedat   TYPE vbak-aedat,  "Doc change date
            vdatu   TYPE vbak-vdatu,  "Requested delivery date
            kunnr   TYPE vbak-kunnr,
            augru   TYPE vbak-augru,  "Job Type
            END OF ty_vbak.
    TYPES : BEGIN OF ty_vbap,
            vbeln   TYPE vbap-vbeln,
            posnr   TYPE vbap-posnr,
            werks   TYPE vbap-werks,
            matnr   TYPE vbap-matnr,
            arktx   TYPE vbap-arktx,
            kwmeng  TYPE vbap-kwmeng,
            vrkme   TYPE vbap-vrkme,
            END OF ty_vbap.
    TYPES : BEGIN OF ty_pbim,
            pbdnr TYPE pbim-pbdnr,  "Requirements Plan Number
            bdzei TYPE pbim-bdzei,  "Independent requirements pointer
            matnr TYPE pbim-matnr,
            werks TYPE pbim-werks,
            END OF ty_pbim.
    TYPES : BEGIN OF ty_pbhi,
            bdzei TYPE pbhi-bdzei,  "Independent requirements pointer
            pdatu TYPE pbhi-pdatu,  "Requirement date
            laeda TYPE pbhi-laeda,  "Date of Last Change
            END OF ty_pbhi.
    TYPES : BEGIN OF ty_ekko,
            ebeln TYPE ekko-ebeln,  "STO doc no
            bsart TYPE ekko-bsart,
            reswk TYPE ekko-reswk,  "Supplying plant
            aedat TYPE ekko-aedat,  "Doc creation date
            END OF ty_ekko.
    TYPES : BEGIN OF ty_ekpo,
            ebeln TYPE ekpo-ebeln,
            ebelp TYPE ekpo-ebelp,
            aedat TYPE ekpo-aedat,  "Doc change date
            menge TYPE ekpo-menge,
            meins TYPE ekpo-meins,
            matnr TYPE ekpo-matnr,
            txz01 TYPE ekpo-txz01,
            END OF ty_ekpo.
    TYPES : BEGIN OF ty_eket,
            ebeln TYPE eket-ebeln,
            ebelp TYPE eket-ebelp,
            eindt TYPE eket-eindt,  "Requested delivery date
            END OF ty_eket.
    TYPES : BEGIN OF ty_lips,
            vbeln TYPE lips-vbeln,
            posnr TYPE lips-posnr,
            vgbel TYPE lips-vgbel,
            vgpos TYPE lips-vgpos,
            lfimg TYPE lips-lfimg,
            END OF ty_lips.
    TYPES : BEGIN OF ty_plaf,
            plnum TYPE plaf-plnum,
            matnr TYPE plaf-matnr,
            gsmng TYPE plaf-gsmng,
            auffx TYPE plaf-auffx,
            stlfx TYPE plaf-stlfx,
            kdauf TYPE plaf-kdauf,
            kdpos TYPE plaf-kdpos,
            pbdnr TYPE plaf-pbdnr,
            END OF ty_plaf.
    TYPES : BEGIN OF ty_aufk,
            aufnr TYPE aufk-aufnr,
            erdat TYPE aufk-erdat,
            objnr TYPE aufk-objnr,
            END OF ty_aufk.
    TYPES : BEGIN OF ty_afko,
            aufnr TYPE afko-aufnr,
            gamng TYPE afko-gamng,  "Total order quantity
            gasmg TYPE afko-gasmg,  "Total scrap quantity in the order
            igmng TYPE afko-igmng,  "Confirmed Yield Qty
            iasmg TYPE afko-iasmg,  "Confirmed Scrap Qty
            aufpl TYPE afko-aufpl,  "Routing number of operations in the order
            END OF ty_afko.
    TYPES : BEGIN OF ty_afpo,
            aufnr TYPE afpo-aufnr,
            plnum TYPE afpo-plnum,
            matnr TYPE afpo-matnr,
            pgmng TYPE afpo-pgmng,  "Plan Order Qty
            kdauf TYPE afpo-kdauf,
            kdpos TYPE afpo-kdpos,
            psamg TYPE afpo-psamg,  "Allotted scrap
            iamng TYPE afpo-iamng,  "Expected Yield Variance
            wemng TYPE afpo-wemng,  "Delivered Qty
            END OF ty_afpo.
    TYPES : BEGIN OF ty_afvc,
            vornr TYPE afvc-vornr,
            aufpl TYPE afvc-aufpl,  "Routing number of operations in the order
            aplzl TYPE afvc-aplzl,  "General counter for order
            arbid TYPE afvc-arbid,  "Object ID of the resource
            ltxa1 TYPE afvc-ltxa1,
            END OF ty_afvc.
    TYPES : BEGIN OF ty_afvv,
            aufpl TYPE afvv-aufpl,  "Routing number of operations in the order
            aplzl TYPE afvv-aplzl,  "General counter for order
            umrez TYPE afvv-umrez,
            mgvrg TYPE afvv-mgvrg,
            lmnga TYPE afvv-lmnga,
            xmnga TYPE afvv-xmnga,
            END OF ty_afvv.
    TYPES : BEGIN OF ty_mdvm,
            mdkey TYPE mdvm-mdkey,
            disst TYPE mdkp-disst,
            matnr TYPE mdkp-matnr,
            plwrk TYPE mdkp-plwrk,
            END OF ty_mdvm.
    DATA :  it_final  TYPE STANDARD TABLE OF ty_final,
            it_vbak   TYPE STANDARD TABLE OF ty_vbak,
            it_vbap   TYPE STANDARD TABLE OF ty_vbap,
            it_lips   TYPE STANDARD TABLE OF ty_lips,
            it_pbim   TYPE STANDARD TABLE OF ty_pbim,
            it_pbhi   TYPE STANDARD TABLE OF ty_pbhi,
            it_ekko   TYPE STANDARD TABLE OF ty_ekko,
            it_ekpo   TYPE STANDARD TABLE OF ty_ekpo,
            it_eket   TYPE STANDARD TABLE OF ty_eket,
            it_plaf   TYPE STANDARD TABLE OF ty_plaf,
            it_aufk   TYPE STANDARD TABLE OF ty_aufk,
            it_afko   TYPE STANDARD TABLE OF ty_afko,
            it_afpo   TYPE STANDARD TABLE OF ty_afpo,
            it_afvc   TYPE STANDARD TABLE OF ty_afvc,
            it_afvv   TYPE STANDARD TABLE OF ty_afvv,
            it_mdvm   TYPE STANDARD TABLE OF ty_mdvm.
    DATA :  wa_final  TYPE ty_final,
            wa_vbak   TYPE ty_vbak,
            wa_vbap   TYPE ty_vbap,
            wa_lips   TYPE ty_lips,
            wa_pbim   TYPE ty_pbim,
            wa_pbhi   TYPE ty_pbhi,
            wa_ekko   TYPE ty_ekko,
            wa_ekpo   TYPE ty_ekpo,
            wa_eket   TYPE ty_eket,
            wa_plaf   TYPE ty_plaf,
            wa_aufk   TYPE ty_aufk,
            wa_afko   TYPE ty_afko,
            wa_afpo   TYPE ty_afpo,
            wa_afvc   TYPE ty_afvc,
            wa_afvv   TYPE ty_afvv,
            wa_mdvm   TYPE ty_mdvm.
    DATA :  it_object TYPE hum_object_t,
            wa_object TYPE hum_object,
            it_item   TYPE hum_hu_item_t,
            wa_item   TYPE vepovb,
            count1(6) TYPE n.
    DATA :  gv_objek TYPE ausp-objek.       "Put matnr for use in FM u2018CLAF_CLASSIFICATION_OF_OBJECTSu2019
    DATA : BEGIN OF it_sclass OCCURS 0.
            INCLUDE STRUCTURE sclass.
    DATA : END OF it_sclass.
    DATA : BEGIN OF it_clobjdat OCCURS 0.
            INCLUDE STRUCTURE clobjdat.
    DATA : END OF it_clobjdat.
    *&  Include           ZPPR_CONVSTAT_SEL_CRITERIA
      SELECTION-SCREEN FOR 'PLANNING STAGE'
    SELECTION-SCREEN BEGIN OF BLOCK main WITH FRAME TITLE text-001.
      PARAMETERS: mrpntdn RADIOBUTTON GROUP sel                    DEFAULT 'X' user-command flag,
                  pldord  RADIOBUTTON GROUP sel,
                  prdord  RADIOBUTTON GROUP sel.
    SELECTION-SCREEN END OF BLOCK main.
      SELECTION-SCREEN FOR 'SELECTION BY PLANT AND PLANT DATA'
    SELECTION-SCREEN BEGIN OF BLOCK plant WITH FRAME TITLE text-002.
      PARAMETERS      : p_werks   LIKE  ioheader-werks OBLIGATORY  DEFAULT '1100' MATCHCODE OBJECT H_T001W.
      SELECT-OPTIONS  : so_matnr  FOR   ioitem-matnr                              MATCHCODE OBJECT MAT1.
      PARAMETERS      : so_mtart  TYPE  t134-mtart     OBLIGATORY  DEFAULT 'ZFIN' MATCHCODE OBJECT H_T134.
      SELECT-OPTIONS  : so_plnum  FOR   ioitem-plnum                              MATCHCODE OBJECT plnum  MODIF ID pld,
                        so_aufnr  FOR   ioheader-aufnr                            MATCHCODE OBJECT orde   MODIF ID prd.
      PARAMETERS      : p_prdsta  LIKE  tj02t-txt04                                                       MODIF ID prd.
    SELECTION-SCREEN END OF BLOCK plant.
      SELECTION-SCREEN FOR 'SELECTION BY REQUIREMENT TYPE'
    SELECTION-SCREEN BEGIN OF BLOCK reqtyp  WITH FRAME TITLE text-003.
      PARAMETERS      : cb_so     TYPE AUSWL_EB AS CHECKBOX USER-COMMAND flag,
                        cb_sto    TYPE AUSWL_EB AS CHECKBOX USER-COMMAND flag,
                        cb_pir    TYPE AUSWL_EB AS CHECKBOX USER-COMMAND flag.
    SELECTION-SCREEN END OF BLOCK reqtyp.
      SELECTION-SCREEN FOR 'SELECTION BY DATE AND REQUIREMENT TYPE NOS'
    SELECTION-SCREEN BEGIN OF BLOCK dtreqtypno WITH FRAME TITLE text-004.
      SELECT-OPTIONS  : so_crtdt  FOR vbak-erdat                                                                MODIF ID gen,
                        so_vbeln  FOR vbap-vbeln                                  MATCHCODE OBJECT WTY_F4_VBAP  MODIF ID rso,
                        so_posnr  FOR vbap-posnr                                                                MODIF ID rso,
                        so_ebeln  FOR ekub-ebeln                                  MATCHCODE OBJECT MEKKM        MODIF ID rst,
                        so_ebelp  FOR ekub-ebelp                                                                MODIF ID rst,
                        so_pbdnr  FOR pbim-pbdnr                                                                MODIF ID rpi,
                        so_reqdt  FOR vbep-edatu                                                                MODIF ID gen.
    SELECTION-SCREEN END OF BLOCK dtreqtypno.
      SELECTION-SCREEN FOR 'SELECTION BY OTHER PARAMETERS'
    SELECTION-SCREEN BEGIN OF BLOCK othrparam WITH FRAME TITLE text-005.
      SELECT-OPTIONS  : so_kunnr FOR kna1-kunnr                                   MATCHCODE OBJECT debi   MODIF ID rso,
                        so_auart FOR tvak-auart                                   MATCHCODE OBJECT H_TVAK MODIF ID rso,
                        so_lfsta FOR vbup-lfsta                                                           MODIF ID rso.
    SELECTION-SCREEN END OF BLOCK othrparam.
    *&  Include           ZPPR_CONVSTAT_PBO
    *&   Event AT SELECTION-SCREEN OUTPUT
    AT SELECTION-SCREEN OUTPUT.
      IF mrpntdn = 'X'.
        LOOP AT SCREEN.
          IF ( screen-group1 = 'PLD' OR screen-group1 = 'PRD' ).
            screen-active = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSEIF pldord = 'X'.
        LOOP AT SCREEN.
          IF screen-group1 = 'PLD'.
            screen-intensified = 1.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'PRD'.
            screen-active = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSEIF prdord = 'X'.
        LOOP AT SCREEN.
          IF ( screen-group1 = 'PLD' OR screen-group1 = 'PRD' ).
            screen-intensified = 1.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
      IF ( cb_so = ' ' AND cb_sto = ' ' AND cb_pir = ' ' ).
        LOOP AT SCREEN.
          IF ( screen-group1 = 'GEN'
          OR screen-group1 = 'RSO'
          OR screen-group1 = 'RST'
          OR screen-group1 = 'RPI' ).
            screen-active = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
      IF cb_so = 'X'.
        LOOP AT SCREEN.
          IF screen-group1 = 'RSO'.
            screen-active = 1.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
        IF cb_sto = ' '.
          LOOP AT SCREEN.
            IF screen-group1 = 'RST'.
              screen-active = 0.
              MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
        ENDIF.
        IF cb_pir = ' '.
          LOOP AT SCREEN.
            IF screen-group1 = 'RPI'.
              screen-active = 0.
              MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
        ENDIF.
      ELSEIF cb_sto = 'X'.
        IF cb_so = ' '.
          LOOP AT SCREEN.
            IF screen-group1 = 'RSO'.
              screen-active = 0.
              MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
        ENDIF.
        IF cb_pir = ' '.
          LOOP AT SCREEN.
            IF screen-group1 = 'RPI'.
              screen-active = 0.
              MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
        ENDIF.
      ELSEIF cb_pir = 'X'.
        IF cb_so = ' '.
          LOOP AT SCREEN.
            IF screen-group1 = 'RSO'.
              screen-active = 0.
              MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
        ENDIF.
        IF cb_sto = ' '.
          LOOP AT SCREEN.
            IF screen-group1 = 'RST'.
              screen-active = 0.
              MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
    *&  Include           ZPPR_CONVSTAT_START_SELECTION
    *&   Event START-OF-SELECTION
    IF mrpntdn = 'X'.
      PERFORM start_of_selection_mrpntdn.
    ELSEIF pldord = 'X'.
      PERFORM start_of_selection_pldord.
    ELSEIF prdord = 'X'.
      PERFORM start_of_selection_prdord.
    ENDIF.
    *&  Include           ZPPR_CONVSTAT_F_START_OF_SEL
    *&      Form  START_OF_SELECTION
          Subroutine for MRP NOT DONE
    FORM start_of_selection_mrpntdn.
        SELECT mdkey INTO TABLE it_mdvm FROM mdvm
                     WHERE GSAEN = 'X'
                       AND AKKEN = 'X'.
          IF sy-subrc = 0.
            LOOP AT it_mdvm INTO wa_mdvm.
              wa_mdvm-disst = wa_mdvm-mdkey(3).
              wa_mdvm-matnr = wa_mdvm-mdkey+3(18).
              wa_mdvm-plwrk = wa_mdvm-mdkey+21(4).
              MODIFY it_mdvm FROM wa_mdvm INDEX sy-index TRANSPORTING disst matnr plwrk.
            ENDLOOP.
          ENDIF.
    ENDFORM.
    *&      Form  START_OF_SELECTION
          Subroutine for PLAN ORDER CREATED
    FORM start_of_selection_pldord.
    ENDFORM.
    *&      Form  START_OF_SELECTION for PRODUCTION ORDER CREATED
          Subroutine for PRODUCTION ORDER CREATED
    FORM start_of_selection_prdord.
    ENDFORM.

    You need to mention START-OF-SELECTION explicitly in your code.
    Change your code as below:
    *& Event START-OF-SELECTION
    START-OF-SELECTION.
    IF mrpntdn = 'X'.

  • Select Query Resutls - operand for WebI Rich Client XI3.0 not available?

    Hi ,
    Using Deski we put a filter condition on a query using the deski query panel.  Also we can select resutls from another query in the same report (query from a differen dataprovider) using the operand Select Query Resutls(any).
    However in Web Intelligence Rich Client for XI3.0 we don't have this operand so we can not filter using results from another query in the same report.
    Does anyone know how to work around this problem?
    Know any plans for this feature ?  As you all know, this is an extremely powerful feature.
    Rgds,

    Minkook,
    Does anyone know how to work around this problem?
    Rich client allows you to import a text or excel file on the fly to your report.  To filter what you have you could build entries into the excel file, import, merge dimensions and voila, have your filtering done.  It does seem dumb to do it this way when a quick filter is all you want.  I'm with you in that the quick filter functionality would be highly desirable.
    Thanks,
    John

  • My select query in not working

    hi
    this my select query
    select * from J_1IEXCHDR where werks = 'DT*'
    this is not working
    i want result where werks like DT01, DT09 and many statting with DT
    so plz tel me how to write for like .
    thank

    Hi,
    >
    Guptaprashant wrote:
    > hi
    >
    > this my select query
    >
    > select * from J_1IEXCHDR where werks = 'DT*'
    >
    >
    > this is not working
    >
    > i want result where werks like DT01, DT09 and many statting with DT
    > so plz tel me how to write for like .
    >
    > thank
    Use:-
    select * from J_1IEXCHDR where werks like 'DT%'.
    Regards,
    Tarun

  • Dynamic From statement in select query and/or outer join not working

    Dear Experts, I have a select query where the select columns are dynamic, the where condition is also dynamic. It is of the below format:
    Select (dynamic columns) INTO <wa>
    FROM a inner join b on af1 = bf1
    inner join c on af2 = cf2......
    WHERE (dynamic conditios)
    ORDER BY ( dynamic sort condition).
    Now I have to include some tables (dynamically depending on the user input) in the inner join statement which will give description for the selected fields. And these database tables may or may no be empty. So in this case, my select query will not return any data if these tables are empty. And I dont want that.
    I tried using outer join for the extra tables but it gave me a runtime error. I also tried forming the inner join statement dynamically but it was not supporting.
    Kindly give me pointers.
    Thanks

    Hey thanks for the reply, but the problem is not solved.
    I am already using  ( fileds, value) like table in my where condition and the select statement was working properly.
    the problem is that now I have to include some tables in the join statement which can be empty and so i want to use Outer join.
    But I am getting a runtime error as below:
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_DYNAMIC_OSQL_SYNTAX', was not
         caught in
        procedure "ZATSCSNG_RFC_READ_TABLE" "(FUNCTION)", nor was it propagated by a
         RAISING clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        The running ABAP program wanted to execute a SELECT statement whose
        WHERE condition was (partly) specified dynamically. The part that is
        specified in an internal table at runtime is compared to a field of the
        right table of an LEFT OUTER JOIN. Such comparisons are not supported by
         all database systems and are therefore not allowed.

  • When opening Bridge (CS6) I get the following message: "Bridge encountered a problem and is unable to read the cache. Please try purging the central cache in Cache Preferences to correct the situation" I tried and after selecting purge cache it does not a

    When opening Bridge (CS6) I get the following message: "Bridge encountered a problem and is unable to read the cache. Please try purging the central cache in Cache Preferences to correct the situation" I tried and after selecting purge cache it does not allow me to select OK. Also Bridge keeps saying "Building Criteria" with the spinning wheel and nothing happens. I tried uninstalling and reinstalling to no avail. Please help:)

    Maybe a Preferences reset can help:
    Numerous program settings are stored in the Adobe Bridge preferences file, including display, Adobe Photo Downloader, performance, and file-handling options.
    Restoring preferences returns settings to their defaults and can often correct unusual application behavior.
    Press and hold the Ctrl key (Windows) or the Option key (Mac OS) while starting Adobe Bridge.  
    In the Reset Settings dialog box, select one or more of the following options:  
      Reset Preferences 
    Returns preferences to their factory defaults. Some labels and ratings may be lost. Adobe Bridge creates a new preferences file when it starts.
    Purge Entire Thumbnail Cache
    Purging the thumbnail cache can help if Adobe Bridge is not displaying thumbnails properly. Adobe Bridge re-creates the thumbnail cache when it starts.
    Reset Standard Workspaces
    Returns Adobe predefined workspaces to their factory default configurations.
    Click OK, or click Cancel to open Adobe Bridge without resetting preferences.   

  • Unknown Column Name "XYZ" not detemined untill runtime.Select query.

    Hi,
    I have written a query in ABAP.I am getting following error.Can some one help me resolve this.There is a column "LANDX" in standard table T005 of PI which i need to get values from. The problem is that the column is visible only at runtime and not otherwise.How can i fetch data from this coulmn writing a select query for this.
    Query written is:
    SELECT landx from T005 into table it_t005.
    Error:
    "Unknown column name "XYZ" not determined untill runtime,you cannot specify a field list."

    Hi Deepika u were right. that there is a landx field but it is included in that table.
    so u cant exactly get it.
    now u can get ur country name and iso code just like this.
    tables: t005t  , t005.
    data: BEGIN OF it OCCURS 100,
            landx like t005t-landx,
            intca like t005-intca,
            END OF it.
    SELECT t005t~landx t005~intca   into CORRESPONDING FIELDS OF TABLE it
      from T005t
      INNER JOIN t005 on ( t005t~land1 = t005~land1 ).
    it is fulfilling ur need.
    Edited by: Matt on Feb 3, 2009 7:49 AM - Please don't use txtspk

Maybe you are looking for