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

Run Time Error

Hi Experts,

I m creating a report related to notification summary.

i have plant and notification fields on screen.I want to fetch notification types,status(nopr,osno,noco) so i m using viqmel and jest tables.

my query is this.

select a~qmnum

a~qmdat

a~qmart

a~iwerk

a~objnr

b~stat from viqmel as a inner join jest as b

  • on amandt = bmandt and

on aobjnr = bobjnr

into table it_viqmel

where a~iwerk = p_werks

and a~qmdat = p_date.

and ( bstat = 'I0068' OR bstat = 'I0070' OR b~stat = 'I0072' )

AND b~inact <> 'X'.

select txt04

txt30

from tj02t

into table it_tj02t

for all entries in it_viqmel

where istat = it_viqmel-stat

and spras = 'E'.

but it is giving DBIF_RSQL_INVALID_RSQL error.

Please suggest me where i m doing mistake.and are the tables correct for this.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 05:18 AM

    if r doing inner join for two tables then u r suppose to write 'on' single time only. in u r case u have to write first select statement as follows.

    select a~qmnum

    a~qmdat

    a~qmart

    a~iwerk

    a~objnr

    b~stat from viqmel as a inner join jest as b

    on amandt = bmandt and aobjnr = bobjnr

    into table it_viqmel

    where a~iwerk = p_werks

    and a~qmdat = p_date.

    and ( bstat = 'I0068' OR bstat = 'I0070' OR b~stat = 'I0072' )

    AND b~inact 'X'.

    Madhavi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 05:18 AM

    hi

    good

    Here is what the dump said and my answers are right below them.

    Possible errors:

    o The maximum size of an SQL statement has been exceeded.

    This may not be the reason in your case. This usually happens when you use the option FOR ALL ENTRIES

    o The statement contains too many input variables.

    Most likely this is your issue. I think your r_lifnr is filled with all the vendors in your system and filled as single values. In that case you may be exceeding a limit set on the system. Instead of trying to remove this setting, what I would suggest is to do the following.

    Define a select-option for LIFNR on your selection screen. This way users can have the flexibility of specifying certain vendors. If they don't enter anything, it is still ok. Don't fill it with single values.

    Use this select-option in your select statement. After the select statement, do a delete from itab where the vendors are not in your r_lifnr as below.

    DELETE t_bsak_tmp WHERE NOT lifnr IN r_lifnr.

    Also, avoid using client. You don't need that unless you really want to select from a different client other than your logon client. Your select statement is using logon client anyway, so you don't need to specify that.

    o The space needed for the input data exceeds the available memory.

    If the above changes are made and the problem is still there, then this is the next thing to look at.

    thanks

    mrutyun^

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 05:45 AM

    select a~qmnum

    a~qmdat

    a~qmart

    a~iwerk

    a~objnr

    b~stat

    into table it_viqmel

    from viqmel as a

    inner join jest as b

    on aobjnr = bobjnr

    where a~iwerk = p_werks

    and a~qmdat = p_date.

    and ( bstat = 'I0068' OR bstat = 'I0070' OR b~stat = 'I0072' )

    AND b~inact = 'X'.

    select txt04

    txt30

    from tj02t

    into table it_tj02t

    for all entries in it_viqmel

    where istat = it_viqmel-stat

    and spras = 'E'.

    u forgot '='

    awrd points if useful

    Bhupal

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 06:21 AM

    Hi Garima,

    Try and use this, you wouldn't get any error,

    tables: viqmel, jest, tj02t.

    types : begin of ty_viqmel,

    qmnum type viqmel-qmnum,

    qmdat type viqmel-qmdat,

    qmart type viqmel-qmart,

    iwerk type viqmel-iwerk,

    objnr type viqmel-objnr,

    stat type jest-stat,

    end of ty_viqmel,

    begin of ty_objnr,

    txt04 type tj02t-txt04,

    txt30 type tj02t-txt30,

    end of ty_objnr.

    data: it_viqmel type table of ty_viqmel,

    wa_viqmel type ty_viqmel,

    it_objnr type table of ty_objnr,

    wa_objnr type ty_objnr.

    parameters: p_werks like marc-werks,

    p_date like sy-datum.

    select a~qmnum

    a~qmdat

    a~qmart

    a~iwerk

    a~objnr

    b~stat from viqmel as a inner join jest as b

    on aobjnr = bobjnr

    into table it_viqmel

    where a~iwerk = p_werks

    and a~qmdat = p_date

    and ( bstat = 'I0068' OR bstat = 'I0070' OR b~stat = 'I0072' )

    AND b~inact eq 'X'.

    select txt04

    txt30

    from tj02t

    into table it_objnr

    for all entries in it_viqmel

    where istat = it_viqmel-stat

    and spras = 'E'.

    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.