Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How do you read a virtual table with ABAP

stephenl1
Participant
0 Kudos
1,928

Hi, I have created a virtual table using Smart Data Integration (SDI). The virtual table now exists on my CRM HANA database, and is based over a ECC view. In Hana Studio SAP Hana Modeler perspective I can successfully run an SQLscript select statement as follows. This returns 31681 rows. I have tried to create a amdp table function over this, but when I specify the same script within my class method I get an error saying my table is invalid, because it is not in the dictionary. Is what I am trying to do not possible, or if it is, can someone illustrate the way this needs to be created? My goal is to make ECC data accessible for use in CRM, and Virtual tables seemed like they were going to be a good solution until I realised there is no way to create a dictionary object representation of the virtual table. If it cannot be done using a AMDP class, what is the best method for getting this data into CRM in realtime?

select mandt, contract_object, consent_object, fee_amount, dc_amount
from zvt_pscd_psobbal;
3 REPLIES 3

UweFetzer_se38
Active Contributor
0 Kudos
892

Never have worked with virtual tables yet, but you may try to read the table with EXEC SQL or Dynamic Native SQL (cl_sql_statement).

0 Kudos
892

"dynamic native SQL", mean ADBC?

0 Kudos
892

Yes
(+ some random characters, beacause SCN needs at least 7 characters before I'm allowed to submit a comment...)