cancel
Showing results for 
Search instead for 
Did you mean: 

[PAL] What is the best way to integrate a PAL Script into a procedure?

Former Member
0 Kudos

Hi experts,

i finished a anomaly detection which is working fine within a SQL console. To use this script i want to copy my sql pal script into a procedure, but it's more difficult then i thought it would be.

Many operators like drop type, truncate table and so on are not allowed in a procedure. Now i am asking myself:

1) Is a procedure the best way to use the sql pal script in a sapui5 frontend?

2) If yes, how to avoid the issues caused by the procedure or

how to transfer the sql script easliy into a procedure?

3) If no, what would be a better way?

thanks,

Andreas

Accepted Solutions (1)

Accepted Solutions (1)

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Also, if you need to pass table data to the PAL function, you may want to consider using ARRAYs in the procedure to build the content, instead of having to create tables.

Cheers,

Rich Heilman

Answers (1)

Answers (1)

sreehari_vpillai
Active Contributor
0 Kudos

Hi Andreas ,

The input data structure for a PAL function remains the constant, hence you don't need to create and drop these all the time . You can create all these table type and other related artifacts externally and then wrap your data load and PAL procedure calling in a procedure .

As you are thinking of consuming these from SAPUI5, you have to convert them into web services ( either XSODATA or XSJS ). In case of XSODATA , you will need to wrap them again( or call the PAL directly ) in a scripted calc view(as we can not expose procedures via odata) .

If you can use XSJS , which is more flexible as you can do all types of operations ( DDL , DML etc ) there in it.

Sree