Question

Creating new custom projection in Aurena: not all sql methods are selectable

  • 23 March 2022
  • 4 replies
  • 199 views

Userlevel 1
Badge +4

Hi,

In Applications 10 UDP13 we try to create a new projection that uses a custom action of type SQL method. After filtering the correct package name, only some of the existing SQL methods are shown. The desired method Get_Part_Via_Identified_Gtin does exists but not appear.

What could be the reason?

 


4 replies

Userlevel 6
Badge +15

Hi Michael,

 

You are trying to find “Get_Part_Via_Identified_Gtin” package and the filter for the package name you have used is “Part_Gtin_API”. I’m not sure whether this is answer is useful yet thought to reply since i noticed a filtration issue.

 

Best Regards,

Userlevel 7
Badge +19

The Custom Action does not support functions. From documentation of 21R2:

https://docs.ifs.com/techdocs/21r2/060_tailoring/220_configuration/300_projection_configurations/300_custom_action_configuration/

 

Custom Actions support methods which have simple Parameters (VARCHAR2, NUMBER, DATE) or no Parameters at all.

Custom Actions currently do not support Methods such as,

  1. Return data (Functions or methods with OUT Parameters)
  2. Complex Data Types (PL/SQL Record Types)
  3. BLOB, CLOB Parameters
  4. PL/SQL methods exposed in Projections (_SVC package), client metadata package (_CPI) and Report package (_RPI) methods

 

Can you describe what you are trying to achieve in the projection by adding that?

Userlevel 1
Badge +4

Thanks everyone for the quick replies!

@Tomas Ruderfelt 

We actually want to generate a REST API that can be used by another external app .

As a workaround we use the standard REST API, for example xxxPartGTINsHandling.svc/PartGtins(PartNo='11114444',GtinNo='11114444') The downside is that a second parameter is needed to get the item data.

However, good to know that not all methods are supported

Userlevel 1
Badge +4

To update:

We've learned something :-) Using entities instead of the underlying SQL functions is a simpler better solution (at least in our case).

By default there are already many REST APIs for most existing entities that can be read, written and modified via REST calls.
E.g.
The following REST call returns a list of SalesPart:
https://servername/int/ifsapplications/projection/v1/SalesPartsHandling.svc/SalesPartSet


With a filter it is possible to get a specific single record from SalsPart:

https://servername/int/ifsapplications/projection/v1/SalesPartsHandling.svc/SalesPartSet

?$filter=contains(GTIN,'11114444')

 

 

Reply