Skip to Content
author's profile photo Former Member
Former Member

ST05 - Explain SQL

Hi all,

I'm using version 4.6C and I want to fine tune my SQL using the Explain SQL function, however I am having difficulty understanding what syntax to use in the tool.

Effectively I want to understand more about the performance of the following statement:-

select cpident tabkey

from bdcps

join on bdcp

where bdcpscpident = bdcpcpident

where bdcps~mestype = 'XXXXXXXX'

and bdcps~process = ' '.

However ST05 doesn't seem to understand what I am typing and keeps giving me an error, saying 'Change update/delete to select if possible', what format of the above statement would ST05 recognise?

Thanks in advance,

Stephen

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Jul 25, 2005 at 01:59 PM

    Hi Stephen,

    something out of topic:

    use view BDCPV instead of a join. That's the common way and you might profit from buffering.

    Regards,

    Christian

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 25, 2005 at 10:33 AM

    select acpident atabkey

    into table i_tab

    from bdcps as a

    inner join bdcp as b

    ON acpident = bcpident

    where a~mestype = 'XXXXXXXX'

    and a~process = ' '.

    Try this one. Ur Select query was wrong.

    SQL Trace

    SQL trace(ST05) provides the developer with the ability to analyse database select statements. Simply execute ST05

    to turn on SQL trace, then execute the statement/program you want to analyse. Now turn off SQL trace using ST05

    and click on list trace to view the details.

    You can also perform traces on other items such as authorisation objects.

    http://www.sapdevelopment.co.uk/security/authority/authority_authtrace.htm

    Hope this helps.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi,

      Go to ST05->Explain one SQL statement.

      Type in Uppercase.

      SELECT * FROM MARA

      No fullstop should be given.

      Then click Explain.

      You can see the trace.

      Hope this solves your problem.If so,kindly close the thread by rewarding points.Otherwise,get back.

      Did you tried?

      Message was edited by: Jayanthi Jayaraman

  • Posted on Jul 25, 2005 at 10:27 AM

    Hi,

    Your select statement should be:

    Here itab should be declared as internal table holding the two fields mentioned in select.

    select cpident tabkey

    from bdcps

    join bdcp into table itab

    on bdcpscpident = bdcpcpident

    where bdcps~mestype = 'XXXXXXXX'

    and bdcps~process = ' '.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.