ABAP RAP Action button Error "Invalid Function Import Parameter"?

2.5k views Asked by At

I have created a Fiori elements app using CDS annotations. My app contains multi-select list report.

I created a Action button using lineItem annotation like below

{ type: #FOR_ACTION, position: 10, dataAction: 'que_post', label: 'tre', invocationGrouping: #CHANGE_SET }

And created action in Behavior Definition as well.

But when I select either one or multiple rows, I am having error "Parameter missing" enter image description here

Following the error screenshot from my network: enter image description here

Can anyone help to resolve this issue? I want to select multiple rows and pass it into my ABAP RAP Action.

Update

My snippet from metadata for function import:

<FunctionImport Name="que_post" ReturnType="cds_z_p_quality_status_serv_def.DummyFunctionImportResult" m:HttpMethod="POST" sap:action-for="cds_z_p_quality_status_serv_def.DelQualityDetailsType">
  <Parameter Name="matnr" Type="Edm.String" Mode="In" MaxLength="40"/>
  <Parameter Name="lifnr" Type="Edm.String" Mode="In" MaxLength="10"/>
  <Parameter Name="charg" Type="Edm.String" Mode="In" MaxLength="10"/>
  <Parameter Name="sernr" Type="Edm.String" Mode="In" MaxLength="18"/>
  <Parameter Name="prueflos" Type="Edm.String" Mode="In" MaxLength="12"/>
</FunctionImport>
1

There are 1 answers

0
Noely Marques On

I was able to solve this using action ( features : instance ) <ActionName>; in BDef and implementing the feature method in Behaviour Pool. https://help.sap.com/docs/ABAP_PLATFORM_NEW/fc4c71aa50014fd1b43721701471913d/dfc68f6275454c41b53510dacaec51d6.html?locale=en-US&version=202110.000