cancel
Showing results for 
Search instead for 
Did you mean: 

Input parameters in SQL Script Calculation View,

Former Member
0 Kudos

Hi Gurus,

Getting problem while passing the input parameters in CV Sql Script...

The below is the code.

SQL Script

BEGIN

  var_out = 

SELECT MANDT, MATNR, BWKEY, STPRS, LFGJA

FROM "ECCSLTD50"."MBEW" ('PLACEHOLDER' = ('$$IN_BWKEY$$', 'US21'))

WHERE MANDT = '150'    ;

END /********* End Procedure Script ************/

I am getting the the below error...

Cannot get the data provider outline

SAP DBTech JDBC: [257]: sql syntax error:  [257] sql syntax error: incorrect syntax near "US22": line 2 col 97 (at pos 183)Please check lines: 4,

Attached the screen shot.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Lalwanth,

Try like below.

SELECT MANDT, MATNR, BWKEY, STPRS, LFGJA

FROM "ECCSLTD50"."MBEW" (PLACEHOLDER."$$IN_BWKEY$$" => 'US21')

WHERE MANDT = '150'

Thanks

Siva

justin_molenaur2
Contributor
0 Kudos

You are not referring to a view in this stored procedure/CV, but rather a physical table, which is why you are getting a syntax error. MBEW is a table sitting in a schema replicated with SLT. Tables cannot accept input parameters, you need to use a where clause...

SELECT MANDT, MATNR, BWKEY, STPRS, LFGJA

FROM "ECCSLTD50"."MBEW" (PLACEHOLDER."$$IN_BWKEY$$" => 'US21')

WHERE "BWKEY" = 'US21'

AND MANDT = '150'

Additionally, you likely don't need the MANDT restriction unless your SLT is replicating multiple clients to the same target (not typical).

Happy HANA,

Justin

Former Member
0 Kudos

Checked below blogs:

Tried both SYNTAX's : select ... from CV1( 'PLACEHOLDER' = ('$$var$$' = 'VAL1,VAL2,VAL3' )

                   

                                                 SELECT field1, field2 FROM CALCVIEW1(‘PLACEHOLDER’ = (“INPUTPARAMETER1”, ‘” VAL1”,”VAL2”,”VAL3”’));

by Krishna,

by karthik

by Latha,

but Couldn't find the solution for my above SQL Script......