Fastest way to run the SAP query Infoset

I get runtime error with below code, can anyone suggest fastest output. Same logic as below: Thanks in advanced!
TABLES: LIPS.
SELECT SINGLE *
  FROM LIPS
  WHERE VGBEL = EKPO-EBELN
  AND   VGPOS = EKPO-EBELP
  AND   MATNR = EKPO-MATNR.
IF SY-SUBRC = 0.
  DELIVERY = LIPS-VBELN.
  STORLOC  = LIPS-LGORT.
  CREATED_BY_DELIV = LIPS-ERNAM.
  CREATED_DAY_DELIV = LIPS-ERDAT.
ELSE.
  DELIVERY = ' '.
  STORLOC  = ' '.
  CREATED_BY_DELIV = ' '.
  CREATED_DAY_DELIV = ' '.
ENDIF.

Hi Jay
I have also got the same problem as above , i have also used the same technique which you mentioned ie connecting EKKO TO EKES and then to LIPS .
But EKES is not having some PO No( EBELN ) but where as LIPS should select fields for that EBELN .
IF GT_EKPO IS NOT INITIAL.
SELECT *
             FROM ekes INTO TABLE gt_ekes1 FOR ALL ENTRIES IN gt_ekpo
                         WHERE ebeln = gt_ekpo-ebeln AND
                                     ebelp = gt_ekpo-ebelp .
IF NOT GT_EKES IS INITIAL.
SELECT *
           FROM lips  INTO TABLE gt_lips FOR ALL ENTRIES IN
                             gt_ekes1 WHERE vbeln = gt_ekes1-vbeln
                                                and   posnr = gt_ekes1-vbelp .
ENDIF.
ENDIF.
Please help me if you have any solution.
Code Formatted by: Alvaro Tejada Galindo on Jan 4, 2010 5:51 PM

Similar Messages

  • How to find the report for the SAP query (Query exists in table AQLQCAT)

    Hello Experts,
    I need to find the tables used in the SAP Query but i don't have access to transaction SQ01,SQ02 and SQ03 to check the same.
    Therefore i checked table AQLQCAT and got the SAP Queries in the system. Then searched for the reports that would have been generated for the same passing  AQusergroupquery name*  in transaction SE38.
    But unfortunately the program does not exists for the given paramenter.
    Could you please let me know how to get the report name for the SAP Query.
    Secondly please suggest any other way of checking the tables used in the SAP Query.
    Also the table name from where i can download the SAP Queries.
    Thanks in advance.
    Regards,
    Rahul Sinha

    I suggest you a simple method.
    Execute the query. When the selection screen is showed,  go to menu and click to SYSTEM->STATUS.
    Check the program name and double click it to access the program code.
    Search for tables or functions into the source code in order to understand where data are taken.
    If you do not find anything , go to the program atttribute and check for logic database, sometimes they are used....
    Best regards.

  • SAP Query Infoset

    Dear All,
    I have created a SAP Query Infoset with ldp pnp, i have a customer infotype added to that infoset.
    One of my field in the customer infotype consist of value and text(meaning values are stored in the infotype, which also has some text attached to it which is the check table).
    Now how can i link those two in the infoset, so that user can choose between them?
    Thanks.
    Moderator message: please choose more descriptive subject lines for your posts.
    Edited by: Thomas Zloch on May 26, 2011 10:12 AM
    Edited by: Satish R on May 26, 2011 10:55 AM
    Edited by: Satish R on May 26, 2011 10:59 AM
    Edited by: Satish R on May 26, 2011 11:00 AM

    Hello Satish,
    In SQ01 when you create your output list, you can right-click the column and select "Value and text",  I am on version ECC 6.0.
    Kind Regards,
    Rae Ellen Woytowiez

  • Extracting SAP Query,Infoset  Data from VB Application

    Hi,
    I need to get all SAP Queries,Infosets and SAP Query Group data from a VB application.
    I have found a Remote Enabled Function called    IQAPI_READ_QUERY_CATALOG.
    But when I call the Function from a VB application ,the call is not successful and even I am not getting any exception.
    The call is getting false with null exception .
    Can anyone please guide me.
    Or is there any other function module /procedure / table to extract SAP Query ,Infoset,SAP Query Group data??
    Thanks in Advance.

    http://stackoverflow.com/questions/3765373/how-do-i-do-a-select-distinct-using-a-sap-infoset-query

  • Class to run standard SAP Query

    Hi,
    Could you help me with finding standard SAP class to run query created in SQ01?
    Thank you

    Hi,
    You can create the TCode for the Sap Query and use to run query.
    refer the links to create tcode for sap query..
    how to create a tcode for abap query
    tcode for sap query

  • Re : The SAP Query

    Can any one mention the database table name where the SAP Query details are saved means details of the Infoset , infogroup etc

    Hi,
    Try AQ* IN SE11 as well (displays list of tables with queries and all that).
    Goto table DD03L and try field names from RS38R and that table displays list of tables got the field names you specified .
    Check table TRDIR. It stores with generated program name
    If query name is AGENCY1 the table stores with AQZZ==/SAPQUERY/AGENCY1

  • To Find the SAP Query from the tranaction code or the program name

    Hi,
    I have a situation wherein I have to modify the sap query associated with an transaction code.But the problem is that I am unable to find the SAP Query.
    <b>Please let me know how to find the SAP query from the transaction code or the program name.</b>
    Thanks and Regards,
    Rupesh

    Hi Rupesh,
    1 use FM
      RSAQ_DECODE_REPORT_NAME
    2. This is one of the best and easiest way.
    3. It will provide u the following info.
       WORKSPACE
       USERGROUP
       QUERY    
       CLIENT   
    4. Thru TCode U must know the program name first.
       This can be discovered using SE93.
    Hope it helps.
    Regards,
    Amit M.

  • Regarding the SAP Query

    Hi I have an SAP query ZGIINOP.
    Which i have created using the Transaction SQVI. It worked fine in development client.
    Now, I have transported it to Quality client were no problems while transporting.
    But when i Executed it in Quality system. It is not working exactly the way it should. It is giving wrong results and it is taking so
    much time to execute and give output.
    Could any one please help me in this issue.
    Thanks and Regards,
    Venki.
    Edited by: Venky Naga on Jun 29, 2009 4:10 PM

    Hi,
    Using the FM : RSAQ_GENERATE_PROGRAM try to generate/activate the SAP Query in the Quality system.
    If  you have access to the SAP Query, Try to adjust the query in SQ01
    SQ01-Menu->Query->More functions->Adjust/Generate Program/Activate
    Hope this helps
    Regards
    Shiva
    Edited by: Shiva Kumar Tirumalasetty on Jun 29, 2009 7:47 PM

  • I am getting "Invalid Identifier" while running the below query

    Iam getting the error "Invalid Identifier, c_rank" while running the below query. Please help.
    select a.*, b.pog_description pog_description, b.start_date,
    row_number() over(partition by b.pog_description order by b.start_date) c_rank
    from temp_codi_dept_35 a, pog_master_msi b, pog_skus_msi c
    where a.sku = c.pog_sku
    and b.pog_id = c.pog_id
    and b.pog_dept = c.pog_dept
    and b.pog_number = c.pog_number
    and b.pog_level = c.pog_level
    and a.sku = 10263477
    and c_rank = 1;

    >
    Iam getting the error "Invalid Identifier, c_rank" while running the below query. Please help.
    select a.*, b.pog_description pog_description, b.start_date,
    row_number() over(partition by b.pog_description order by b.start_date) c_rank
    from temp_codi_dept_35 a, pog_master_msi b, pog_skus_msi c
    where a.sku = c.pog_sku
    and b.pog_id = c.pog_id
    and b.pog_dept = c.pog_dept
    and b.pog_number = c.pog_number
    and b.pog_level = c.pog_level
    and a.sku = 10263477
    and c_rank = 1;
    >
    You can't use 'c_rank' in the where clause because it doesn't exist; you are computing it in the SELECT clause.
    Remove the last condition and wrap your query in another one to select by 'c_rank'.

  • Fastest way to activate the camera?

    What is the fastest way to activate the camera on the iPhone 3GS? (rather than pressing the on key; going to camera app;etc).

    As to another place to click, I am in some doubt there. When I updated, it was just one of those things available and I did this in one go (as per previous post). I am not sure why this is not working in your case, but did you try powering down and then turning it back on again?
    As to the point about 3.1.2 and 3.1.3 I so not think that makes a difference.
    Ah, going straight from a locked phone to the camera? I know that one: no. And I regret this as much as you. How do you know you are going to take a spontaneous shot, eh?
    A later note on your settings and iLukeKendall's input: you both have the iPod Controls Off, while mine are ON, but the double click reveals the camera for me. Hmmmm.

  • Running the BEX query from webdynpro ABAP

    Hi Gurus,
    Can someone provide the code for running the BEX query from WDA.
    Thanks,
    David.

    Hi! Do you want to get query results in ABAP or to open excel from browser?

  • I forgot my password and email Forgot your private cloud small my daughter and I can not use the device jewelery Is there another way to run the machine?

    I forgot my password and email Forgot your private cloud small my daughter and I can not use the device jewelery Is there another way to run the machine?
    I hope there is a solution to this problem note that I can not use the iPad now

    Your question makes no sense and I'm not sure if you typed very quickly and autocorrect went nuts on you, or if you are not a native English speaker and Google Translate didn't work properly. If you are saying that you forgot the passcode to unlock the iPad, follow the instructions here.
    Forgot passcode for your iPhone, iPad, or iPod touch, or your device is disabled - Apple Support

  • How to add new codes into SAP Query/Infoset

    Hi Experts,
    First time working with SAP Query.
    I need to enhance an existing Query to add a new field into a report.  I have added new tables into this Infoset and joined my new  tables with existing tables and able to extract the new fields out on the report.  But here are my problems:
    Example of original output:
    X88888 500000
    X99999 400000
    Example of new output after adding my 2 new tables to get 1 new field to output:
    X88888 50000  01/08/2009
    X88888 50000  01/25/2009      <--- for X88888 customer, I want only this record w/ latest date to be output
    X88888 50000  01/22/2009   
    X99999 40000  03/09/2009
    X99999 40000  04/18/2009
    X99999 40000  04/19/2009      < -- for X99999, I want only this record w/ latest date to be output
    Where/How i can add the code to control this logic so that only 1 record per customer with the highest date can be output.  I looked at the query program and it looks very confusing and hard to understand.
    Please advise,
    Thanks,
    Sam

    Hi Sam,
    Instead on adding new table/tables , better way to use Direct Read from your single table.
    Please read the below steps to suffice your requirement.
    Assumption: Let your original table be A and second table is B.
                            Tables A and B are having field X1 and X respectively, using these fields, they can be joined.
                             You want field date1 of table B.
    Infoset Changes:
    1. Go to SQ02 (Enter Infoset name, click on Change button)
    2. Create an extra field E_date of type date (Sy-datum), by clicking on 'Extras' (F5) button.
    3. Select that field in one of the field group of your Infoset.
    4. Click on Code Icon (Shift+F8) displayed on application bar, you will be getting lists events in 'Code section'.
    5. In Data Section , declare an internal table like below code (here pseudo code)
    data: begin of itab_date occurs 0,
                       date1  like B-date1,
                       end of itab_date.
    6. In Recod processing Event write the following code.
    CLEAR itab_date.
    CLEAR E_date.
    SELECT date1 FROM B into table itab_date                           " Retrieving date field from table B
    WHERE X = A-X1.
    Sort itab_date by itab_date-date1  DESCENDING.                 "Sort internal table B in decendind order on date1
    READ TABLE itab_date index 1.                                            "Read first record of interanal table
    E_date  = itab_date-date1                                                      "Assigning top most date of internal table into field E_date.
    7. Generate the Infoset
    Query changes
    1.Go To SQ01 (in a new session),
    2.Give your Query name, click on change button, and select that field group in which you have added extra field.
    3.Select extra field.
    4.Go to basic list to select that field in your O/p list.
    5.Click on Test button, and see if you are getting desired result.
    Please let me know if you need further details.
    Regards,
    Dinesh

  • Output Technical Field Names in the SAP query Output

    Hi Experts,
    I am new to SAP Query/ABAP Query or Quick Viewer. Just would like to know if there is a way whereby I can print the technical field names as opposed to the English field headers. For example I want to print BUKRS in the place of CoCode.
    I have a vague feeling this could be possible through custom coding in SQ02 but have no idea which code section to choose.Any inputs greatly appreciated.
    thanks in advance,

    Hi Sreegopalan,
    Open your infoset in SQ02, by default in the left hand side you'll be having the tables that you have selected, double click the field name which you want change the long text, it will open a attributes window below your field group. Change the header data text as you wish.
    Please find the query documentation in the below link.
    [http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVQUE/BCSRVQUE.pdf]
    Regards,
    Nandha

  • Running a query in a View Designer results in an error, but running the same query in a Query window works

    Hi everyone,
    Just as my title says, I have a query which I've written in a query window and it works perfectly.
    But when I try to add the query code into the view designer, it throws a Syntax error.
    Error in ON clause near '('.Unable to parse query text.
    Also, when running the query from the view designer (pressing red exclamation mark) I get a different error.
    SQL Execution Error.Executed SQL statement: SELECT Sku, ParentSku, UPC, ...Error Source: .Net SqlClient Data ProviderError Message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
    Has anyone else experienced this and is there any workaround?
    I have tried to create the view with T-SQL (CREATE VIEW etc.), but when opening it in the view designer I get the error from the 1st image.
    Thank you,
    Radu

    Hi Radu,
    Yes, I have faced similar issue. I had a View and it was working totally fine but when once I opened it in via right click - View Design, it was giving parse error.
    Cause is that Query designer parse and executes the query without error but the way View designer works, it can't parse it.
    Later I ignored View desinger and just used T-SQL like CREATE/ALTER view.
    Workaround is to do right click on View - Script View as - CREATE To/ ATER To.
    Regarding Timeout error, again the issue with View designer which couldn't execute query in there and ended up with timeout error.
    If your SELECT query and SELECT * FROM YourView works fine in Query designer, you are good to go.
    Similar threads:
    View with errors still saved, and still works...
    Parsing error when creating view
    -Vaibhav Chaudhari

Maybe you are looking for

  • Confuguration of DMS using an external content server and KPRO

    Hello all, I am working in a new EH&S SAP environnement. The aim is to configure a DMS to link EH&S with an external content server Documentum using Kpro. I have done the following IMG activities: - Specify Content Servers (Tcode: OAC0) - Maintain Ca

  • Accordion with defaultPanel other than 0

    I have tried setting the defaultPanel option in the constructor, with little luck. I looked at the SpryAccordion.js file [1.6] and noticed this.defaultPanel = 0; , so I changed the 0 value to 1 and tested with my constructor set to 1 as well and it w

  • Face recognition

    Hi, Is it possible to sort or select which of images of a person who will be the main image displayed in face recognition in Lightroom 6? In Aperture and iPhoto you can choose which photo should be key photo. ..Jan

  • How to open an image in which i can scroll down

    Hello Things may have changed, but I can't figure out how to do this : I got an MSO (1:0% / 2:100%) and i want a button to open the sate 2 which is a big full screen image (1024*2000) okay i can have it opened, and closed etc. but can't find out how

  • Administrator email address in Calendar server

    The calendar configuration script asks for "Administrator Email Address" which is by default root@<localhost>. Do you usually change that e-mail address to point to postmaster account: [email protected]? Thanks,