Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Run Time Error - SQ01 query

former_member466848
Participant
0 Kudos

Hello,

I have created queries in SQ01 and some times when I try to execute them to get to the selection screen, a run time error shows up. Even before it gets to the selection screen, the error occurs.

Not sure why this happens because no changes were made to the query or the infoset.

The error disappears and the query works fine by going into the change mode on the query and saving it (no actual changes made). Below is a snapshot of the error analysis.

What happened?
    Error in the ABAP Application Program

    The current ABAP program "SAPLALDB" had to be terminated because it has
    come across a statement that unfortunately cannot be executed.

    The following syntax error occurred in program "AQA0FTM=========GL_BAL_12MO===
     " in include "AQA0FTM=========GL_BAL_12MO=== " in
    line 3:
    "INCLUDE report "/1BCDWB/IQ000000000139DAT" not found"
    " "
    " "
    " "

What can you do?

    Please eliminate the error by performing a syntax check

    (or an extended program check) on the program "AQA0FTM=========GL_BAL_12MO===

     ".

    You can also perform the syntax check from the ABAP Editor.

11 REPLIES 11

Former Member
0 Kudos

The include "/1BCDWB/IQ000000000139DAT" must be generated during runtime.

So, when you save, this include gets created, and no error occurs.

Why dont you generate program and run that program to get the desired results.

Go to Query>More Functions> Generate Program

former_member466848
Participant
0 Kudos

That is what I have been doing. I cannot let the users know that they would have to generate  the program every time this error occurs. It just does not make sense. Good solution might be to find the cause for this issue and fix so it does not occur in the future.

We had to generate the program or change and save the same query multiple times over the past couple weeks.

raymond_giuseppi
Active Contributor
0 Kudos

Did you execute the report via SE38/SA38 or a report transaction, or did you execute it from SQ01 or START_REPORT transaction ?

Regards,

Raymond

Puneet_Gupta
Contributor
0 Kudos

If the query is called from SQ01 then it auto compiles each time. If you are using custom TCodes, a good way would be to point the Tcode to call the program SAP_QUERY_CALL to exceute the query. This also ensures that the query is compiled before it runs.

The other option is to to go via SQ02 -> GoTo -> Query Directory

Execute to get list of all queries and then Generate the selected queries

Thanks,

Puneet

former_member466848
Participant
0 Kudos

Raymond,

We use SQ01 transaction to execute the query.

Puneet,

If SAP_QUERY_CALL generates the program every time we run it, this might be a good option, but the only problem I see that there is no dropdown to select the query. So the users will have to go to SQ00 or SQ01, get the query name and then run the program.

Option 2 is an easy way to regenerate all queries/infosets but this still does not solve the issue because we are hitting on the run time error atleast couple times a week on multiple queries. So we would have to run the regeneration every time we hit the issue. I agree that this option definitely reduces the pain of regenerating every infoset one at a time.

I am still looking for ideas on how to find out why this error occurs every so often and how to get rid of it completely.

0 Kudos

- There is some information available at Note 393160 - SAP Query: Using queries

- Do your users access query by program name, SQ01 or transactions using START_REPORT (My first answer was not clear enough ) AFAIK only the first option should cause problems. ?

- Were some of the database table read by the queries updated (appended) ?

- Is a "cleaner" program scheduled in your system that would delete the generated reports ?

Regards,

Raymond

0 Kudos

Raymond,

1. I checked the note 393160 but could not find anything relevant to the issue we are facing.

2. Users access the query by SQ01

3. No structure updates / appends took place on the database tables

4. I am not familiar with this. Is there a way I can check if a cleanup program is running to delete the generated reprots?

Regards,
Rajneesh

0 Kudos

Did you use some logical database (SE36) to define the infoset ?

Regards,

Raymond

0 Kudos

No. Normal table joins

0 Kudos

Hello Rajneesh.  Have you found a solution to this issue?  We are randomly experiencing the same issue.  I cannot find any solution for this.  It seems like when users run SQ00 / SQ01 random queries cannot run because of include reports *DAT is not found.  Regenerating the report works for a while but then we experience the problem with the same report again.

0 Kudos

Hello Mike and Rajneesh,


we had the same problem.


If you use Lumira Desktop or other applications, which generate SYSTGENERATE / SY... System-Querys in Standard (Local) Area !!!, please try note 2327531.

With this note SAP uses only the counter from table AQDB client 000 (Global Area) yet and you get unique entrys for both tables AQGQSTRUC (global) /AQLQSTRUC (local) regarding field QNUMBER.

Background:
Field QNUMBER is used to generate the underlying ABAP Query object names and these ABAP objects must be unique (client independent).

Bevor this note, sometimes the wrong ABAP Query objects are deleted, if there are overlapping values for the local counter and an existent entry in table AQLQSTRUC field QNUMBER.

Temporary you see two entries with the same QNUMBER value in table AQLQSTRUC.

Root cause analysis:

Please take a look at transaction AUT10 or S_AUT10 and analyze the table protocols for table AQLQSTRUC.

Search for entries with "Data record deleted". You find the affected queries in column "Table key".