12-05-2017 4:26 AM
Hi Expert,
I am trying to create an ABAP CDS table, but I need to do some row-level processing in AMDP implementation, but I don't know how to return the result table variable in this AMDP implementation. the AMDP code as below:
as above, the final result table variable is VAR_OUT, I want to return this table variable, is it possible? how to code this return statement in AMDP procedure?
Many Thanks,
12-06-2017 6:43 AM
"still have the issue, which some data type inconsistent between table definition and AMDP code."
Check the mapping tables.
12-05-2017 6:12 AM
12-05-2017 6:15 AM
Hi!
It need to be specified in the AMDP method definition. This can be implicitly for instance from your CDS table function or explicitly in the method definition in the AMDP class. Then use the RETURN statement in the AMDP or popupate the defined export parameter.
Check this out: https://blogs.sap.com/2015/10/21/abap-news-for-release-750-cds-table-functions-implemented-by-amdp/
12-05-2017 7:36 AM
12-05-2017 7:53 AM
I did not even know there was another reply. I see you beat me with 3 min posting your answer. 🙂
Well, then it must be a good link, right?
12-05-2017 8:03 AM
:). It is so good that even the writer of that linked blog answered the question.
12-05-2017 7:45 AM
12-05-2017 7:46 AM
The return value of a CDS table function implemented in AMDP has the
With other words, inside the procedure it has a tabular type that you can fill in the implementation. What exactly is your problem?
12-05-2017 8:00 PM
Thanks Horst, if I understand correctly, I fill the data into corresponding field in AMDP procedure, but still have the issue, which some data type inconsistent between table definition and AMDP code.
12-05-2017 5:59 PM
Thanks all for quick respond.
after adjusting the code, finally I put return statement into the code below:
and there is no error for the AMDP procedure any more:
but when I try to preview the data for the ABAP CDS table, I get following error:
can you pleas help how to fix the issue?
I try to debug the code, but I can't put break-point into the code with following error:
am I wrong with some concepts or operations?
finally after run OPEN sql for this ABAP CDS table, I get following error message:
but compare the data type for the fields of the ABAP CDS table with array types below in the code, I don't find any different, is the error message pointing to other meaning?
12-05-2017 6:01 PM
12-06-2017 6:43 AM
"still have the issue, which some data type inconsistent between table definition and AMDP code."
Check the mapping tables.
04-01-2018 4:22 PM
hi horst keller,
I have seen many of ur blogs and I am following of it.Sir I have started using AMDP but only with select statements with joins.I wanted know what all functions does amdp support which are supported in ABAP.Please give me a reference regarding the same.
thanks
Regard's
uday
04-01-2018 5:40 PM
AMDP isn't implemented in ABAP but in Hana's SQLScript.
ABAP just manages the procedures, creation, lifetime etc.
You must read the SQLScript reference.
For simple queries you don't need AMDP at all.