cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

This message was moderated.

lbreddemann
Active Contributor
0 Kudos

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..

Former Member
0 Kudos

Hello Lars,

thank's for the Response. Just tried the join, I'm getting no error on activating my Stored Procedure. That's fine.

But the second hint doesn't work for me. Can you give an other example for the WHERE CLAUSE please?

Thanks in advance and best regards,

Heinrich

lbreddemann
Active Contributor
0 Kudos

Why didn't it work? Any error message?