cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP RAP - Factory Actions

Good afternoon experts,

Working on SCP ABAP environment we've an unmanaged scenario based on a CDS root view on top of a persistent table (we also used the alternative of using a custom entity an implementing its query).

We try to define an action in its behavior able to create several new entities at once. Data for these new entities would come from consuming an external service.

For doing so, we did define the behaviour definition as follows:

unmanaged implementation in class zbp_i_dm_links unique;

define behavior for ZI_DM_LINKS alias Links

lock master
//authorization master ( instance )
etag master changed_on
{
  field (readonly) changed_on, changed_by, created_on, created_by;
  create;
  internal update;
  delete;

   static factory action Extraction [1..*];
}

However, this didnt work since we got an error when activating the service binding as:

com.sap.adt.communication.resources.ResourcePreconditionFailedException: Execution of request "POST /sap/bc/adt/businessservices/bindings?corrNr=H01K900006" failed: 412 Precondition Failed
Metadata not loaded - See /IWBEP/ERROR_LOG in backend '' - ZC_DM_LINKS for operation Extraction not supported....

Being "ZC_DM_LINKS" defined as root view entity projection on the initial CDS view and containing all UI annotations.

Didn't find much documentation or samples related to this sort of actions beyond a couple of lines in SAP Help

Would you know what we're missing here?

Many thanks in advance.

Regards,

Daniel

Accepted Solutions (1)

Accepted Solutions (1)

Seems like the answer is in SAP Help:

Result Cardinality
The result cardinality for actions determines the multiplicity of the output. 
In this way, it indicates whether the action produces 0..1, 1, 0..n, or 1..n 
output instances. The possible values for cardinality are therefore:
[0..1], or [1], or [0..*], or [1..*].

Note! RAP does not support actions with result entity cardinality greater than 1.

Answers (0)