cancel
Showing results for 
Search instead for 
Did you mean: 

CDS Table Function return using AMDP

shivenganguly91
Explorer
0 Kudos

Hi Experts,

Just wondering...

Is there any way that the returns {} could be more simplified by passing on a Table type rather than passing huge number of fields.

A sample code by SAP which has 5 fields, in my case i have 200+ fields.

Couldn't find anything like that in Documentation hence posting this question to the world.

@ClientHandling.type: #CLIENT_DEPENDENT
define table function DEMO_CDS_GET_SCARR_SPFLI
with parameters
carrid :s_carr_id
returns
{
client :s_mandt;
carrname :s_carrname;
connid :s_conn_id;
cityfrom :s_from_cit;
cityto :s_to_city;
}
implemented by method
CL_DEMO_AMDP_FUNCTIONS=>GET_SCARR_SPFLI_FOR_CDS;

========= SOMETHING LIKE BELOW ===================================

@ClientHandling.type: #CLIENT_DEPENDENT
define table function DEMO_CDS_GET_SCARR_SPFLI
with parameters
carrid :s_carr_id
returns
{
lt_tablereturn : <table type>;
}
implemented by method
CL_DEMO_AMDP_FUNCTIONS=>GET_SCARR_SPFLI_FOR_CDS;

Accepted Solutions (0)

Answers (1)

Answers (1)

sreehari_vpillai
Active Contributor
0 Kudos

Feature not yet available. I am looking forward to see this feature using macros in future releases,.

SH

shivenganguly91
Explorer
0 Kudos

Ok, Thank you Sreehari for the insight.