cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with '[%0]'

Former Member
0 Kudos

Good day Everyone!

I am having some problems with this, i would like to call a store procedure from SAP but giving a variable that it will prompt to the user wich means like

this = '[%0]', but in a store procedure like this = execute mystore '[%0]' but it is not working.

Hope someone can help me,

Thank you for reading this post!

Accepted Solutions (0)

Answers (3)

Answers (3)

bruno_peyron
Active Participant
0 Kudos

On this general issue (not the double-posting ), SAP note #730960 might be worth a look, if you don't know it already.

Regards,

 OC

Former Member
0 Kudos

Thank you! , it works perfectly

rasmuswulff_jensen
Active Contributor
0 Kudos

No problem... that why the forum is here for

rasmuswulff_jensen
Active Contributor
0 Kudos

Seems to be a bug or limitation... Using a SQL profiler I can see that the SQL does not get passed on the the SQL-server

It seem s that [%0] only works in WHERE conditions and also for some reason Table-name substitutes are needed

Works:

SELECT T0.[ItemCode], T0.[ItemName] FROM OITM T0 WHERE T0.[ItemCode] =[%0]

Don't work:

SELECT ItemCode, ItemName FROM OITM WHERE ItemCode = [%0]

Indeed wierd

If you really need this and the values for [%0] is somewhat limited you could do something like this if you variable is a code of some kind

DECLARE @var AS Varchar(20)
SET @var = (SELECT T0.ItemCode FROM OITM T0 WHERE T0.[ItemCode] ='[%0]')
EXEC DoSomthing @var

Former Member
0 Kudos

Hi,

SELECT T0.[ItemCode], T0.[ItemName] FROM OITM T0 WHERE T0.[ItemCode] =[%0]

this query is working fine. but in Report our selected parameters are displaying.

for this query only Itemcode is displayed on the report.

how to show the parameter value " ItemName " along with that parameter of "Itemcode" ?

How to show the Itemcode and Itemname as Existing values in One parameter.

plz help me asap

Regards,

Ravi

rasmuswulff_jensen
Active Contributor
0 Kudos

Off-topic:

Ravi... You allready have a thread about this... It is not very nice to just post into a similar thread (you wont get you answer faster that way....)

Please read the the Rules of Engagement here: https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement (in this case the part of only one question per thread fits)