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: 
Read only

Accessing different schemas using AMDP

Srinivas-Rao
Contributor
0 Likes
1,085

Hi All,

I have a requirement to pick the identification number from table BUT0ID from a physical schema which is filled using SLT replication. Since, I have to make sure that the code works in quality and production seamlessly, I have to ensure that I hit on schema mapping table and get the corresponding physical schema. Using this obtained physical schema, I have to hit SELECT on BUT0ID.

I plan to use AMDP. I am able do SELECT on _SYS.BI.M_SCHEMA_MAPPING, but I am unable to pass the outcome of the select as the input to the next select dynamically. Is it possible to do so, in first place ?If yes, sample code can help.

Hi All,

I have a requirement to pick the identification number from table BUT0ID from a physical schema which is filled using SLT replication. Since, I have to make sure that the code works in quality and production seamlessly, I have to ensure that I hit on schema mapping table and get the corresponding physical schema. Using this obtained physical schema, I have to hit SELECT on BUT0ID.

I plan to use AMDP. I am able do SELECT on _SYS.BI.M_SCHEMA_MAPPING, but I am unable to pass the outcome of the select as the input to the next select dynamically. Is it possible to do so, in first place ?If yes, sample code can help.

1 REPLY 1
Read only

Srinivas-Rao
Contributor
0 Likes
745

Hi All,

Resolved it myself. There is a syntax in AMDP, where in we can use the AMDP macros. The AMDP macros $ABAP.Schema helps to translate the logical database schema name to the physical database schema. This way, the macro internally converts the logical name given to it, into the physical name and then executes the SELECT statement with the physical schema name.

Thanks & Regards

Srinivas Rao.