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

Correct syntax for passing a table_parameter to SELECT statement in Stored Procedure

Hello experts,

on my screenshot you can see a snapshot of my stored procedure.

My problem is as follows:

I defined a table input parameter "IT_BELEGE" with two columns C01VBELN and C01POSNR.

Now I don't know the correct syntax how to integrate "IT_BELEGE" to my select statement.

When I call the procedure in ABAP, I want to pass an internal table, with pairs of C01VBELN and C01POSNR.

In the select statement I want something like "FOR ALL ENTRIES IN IT_BELEGE" like you know it from ABAP OpenSQL.

Is this possible?

Thanks in advance and best regards,

Heinrich

SP.JPG (104.8 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jul 19, 2016 at 09:59 AM

    You can either use an inner join here, where your IT_BELEGE is just another table

    or you provide the WHERE condition equal condition just like any other table:

    ("SD202"."/BIC/C01VBELN", "SD202"."/BIC/C01POSNR") =

    (:IT_BELEGE."C01VBELN", :IT_BELEGE."C01POSNR")

    All that is just simple standard SQL..

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 20, 2016 at 07:59 AM

    This message was moderated.

    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.