cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

RAP : Error for Action with Deep Table Parameter - Metadata and Service Binding fails

Ramjee_korada
Active Contributor
12,042

Dear Experts,

BTP - ABAP Environment

Below error is encountered during Service binding and Metadata load if an action is defined with deep table parameter in a Behaviour definition but it works with deep Parameter.
Error in entity 'YYY': 'T' is not a valid value of the enumeration type "TY_ACTION_PARAMETER_DEPTH'.

Upon checking exceptions further , It is noticed that the relevant logic is commented out in RAP framework. please see below screen shots.

But the RAP documentation and F1 help is updated on usage of it. Not sure if I am missing something here on how to use.

Base behaviour :

action Partial_PR_To_PC deep table parameter ZRK_A_PartialPrToPCHead;
define root abstract entity ZRK_A_PartialPrToPCHead
{
key ObjectId : zrk_object_id ;
Buyer : zrk_buyer_id;
_Items : composition [0..*] of ZRK_A_PartialPrToPC ;
}

@EndUserText.label: 'Partial PR to PC'

define abstract entity ZRK_A_PartialPrToPC

{ 

key item_no : zrk_item_no; 

part_no : zrk_part_no; 

comm_code : zrk_category_id; 

plant : zrk_plant_no; 

supplier : zrk_sup_no; 

_Parent : association to parent ZRK_A_PartialPrToPCHead ; 

}<br>

As we can see in below screen shot, value for deep table parameter is commented and not allowing further.

Best wishes,

Ramjee Korada

Accepted Solutions (0)

Answers (3)

Answers (3)

tobias_bock
Explorer

Hello,
we have the same problem in release 2022.
A workaround would be to use a deep abstract structure with the actual table as child entity and use it as a flat deep parameter in action like "action <the action> deep parameter <abstract entity>" as described here .

Ramjee_korada
Active Contributor

Hi Tobias,

Thank you for feedback. I have already applied this workaround.

I raised this question as the documentation says that the feature is supported.

BW,

Ramjee

tobias_bock
Explorer
0 Likes
We got feedback from SAP:
tobias_bock
Explorer
We got feedback from SAP: "Deep action parameter are supported from release SAP Basis 758 (2023)."
tobias_bock
Explorer
...and the comment function doesn't work... 🙂
martinc_mb38
Participant
0 Likes
@tobias_bock We are on 2023 / Basis 758 (on-prem) and yet I still get the same error. Did SAP perhaps say if they support this only in the S/4 Cloud offerings?
saiifgasmi
Explorer
0 Likes
Hello, could you please detail what type of workaround you did?
saiifgasmi
Explorer
0 Likes
Hello, could you please detail what type of workaround you did?
saiifgasmi
Explorer
0 Likes
Hello, could you please detail what type of workaround you did ?
Vivek0603
Discoverer
0 Likes

Hi,

I am facing the same issue on release 2023 system and have used this same workaround suggested in earlier comment. Looking at documentation it does say deep table parameters are not supported, although the language is not very convincing ( maybe because it depends on the oData service being UI or Webservice ).

https://help.sap.com/docs/abap-cloud/abap-rap/modeling-parameters-for-non-standard-operations

Exposure and Consumption of Operations with Parameters in RAP Services

The following restrictions apply on exposing operations with deep parameters:

OData V2 only allows non-standard operations with flat parameters. The service binding shows an error message if a non-standard operation with a deep parameter is included in the service.

The following types are generally not supported for OData exposure:
    • scalar types
    • deep table parameters
    • deep parameters as input or output parameters of functions.
    The service binding shows an error message if these kind of parameters are used in the service. Operations with these kind of parameters can be consumed via EML.

Fiori Elements UIs can't represent hierarchical structures by default. So deep parameters can't be consumed by these UIs.

VikrantSharma
Advisor
Advisor
0 Likes
jorge_aristi
Newcomer
0 Likes

Hi Ramjee,

I was following the documentation https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbdl_action_input_param... and arrived to the same problem, so I suppose we're not missing something but it seems that I'll not really work even it's documented otherwise because it was suppressed by code. I'll escalate the topic to SAP using my company periodical meetings with them but one doubt came to me, at any point it was working for you an then stopped working? Or since the very first time you tried never worked?

Also, if you have any update would be fine to know.

Regards,

Jorge Luis.

Ramjee_korada
Active Contributor
0 Likes

Hi Jorge,

It never worked. Due to my own interest, I debugged in standard and noticed that required code is commented.

Best wishes,

Ramjee