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

SELECT in RFC problem with WHERE statement

Hello Experts,

I am using a SELECT statement in the sourcecode part of a RFC. In this SELECT Statment I want to filter the results by one of the IMPORT variables. This won't work because the variable is interpretate as field in the "FROM table". It says can't be found in table.

I also tried to put the variable in a local variable like:

temp LIKE MATNR.
temp = MATNR.
...
WHERE OBJCT = temp.

But this works neither.

DO you know how to do this SELECT?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Apr 28, 2008 at 01:39 PM

    In table AUSP you dont have any MATNR..it has OBJEK

    so your select should be some thing like this

    Select..

    ...

    Where OBJEK = MATNR.

    I am sure this should work.

    santhosh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 28, 2008 at 12:42 PM

    Hi,

    You can you use import parameters in where condition it will works fine I think you may facing problem not with import parameter something else.

    Eg: below Eg:

    import

    MATNR LIKE MARA-MATNR

    EXPORT

    DESC LIKE MAKT-MATXT

    SOURCECODE

    select single matxt from makt into desc

    where matnr = matnr and

    SPRAS = 'EN'.

    same eg test it once it will works

    Thanks

    Ganesh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 28, 2008 at 12:46 PM

    But this works neither....what doesn't work. Don't you get any values returned, or do you get a syntax error?

    How is the field objct defined in the table you want to select from? If the type is different then this could cause problems, or are you missing leading zero's or....

    But first tell what you mean by: But this works neither....

    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.