07-07-2015 1:57 PM
Hi,
We have Different Schema Containing Source Data replicated from SAP R/3/Non SAP systems.
Currently we are using concept of external view to access data in ABAP, But i want to access it in CDS in ABAP Without Creating External View through table in source system. I also tried "SOURCE"."TABLE". But its doesn't work.
So, How can i access table in different scheme in CDS?
07-07-2015 3:30 PM
Hi Rohit,
you cannot access replicated tables in other schemas by means of ABAP CDS views maintained in an ABAP DDLS object - the answer might be different for native HANA CDS views, but for that we'll have to ask the HANA development guide or a corresponding expert around :-).
If there's a corresponding DDIC table, you might use the approach Christian mentioned above, but as you state it's a non-SAP system, I fear that this is not the case.
Alternatively, you might want to use ABAP managed database procedures (http://scn.sap.com/docs/DOC-51612), but therein you'd have to hard-code the schema name, which you certainly also don't want, right?
So your last two options seem to be native SQL (ADBC) or the external view approach you already mentioned yourself.
Cheers,
Jasmin
07-07-2015 3:19 PM
Probably you may want to use an Open SQL - Secondary Database Connection, see
http://help.sap.com/abapdocu_740/en/abenopensql_multiconnect.htm
07-07-2015 3:30 PM
Hi Rohit,
you cannot access replicated tables in other schemas by means of ABAP CDS views maintained in an ABAP DDLS object - the answer might be different for native HANA CDS views, but for that we'll have to ask the HANA development guide or a corresponding expert around :-).
If there's a corresponding DDIC table, you might use the approach Christian mentioned above, but as you state it's a non-SAP system, I fear that this is not the case.
Alternatively, you might want to use ABAP managed database procedures (http://scn.sap.com/docs/DOC-51612), but therein you'd have to hard-code the schema name, which you certainly also don't want, right?
So your last two options seem to be native SQL (ADBC) or the external view approach you already mentioned yourself.
Cheers,
Jasmin
07-07-2015 5:16 PM
Its really sad to hear it. Only approach seems to be External view, haven't try ADBC yet, will give it try, But there should be some way to access table in Other schema , as we can do in AMDP("Source"."Table" or by using view ) or some thing like , where mapping can be take care.
Thanks. will try ADBC way..