cancel
Showing results for 
Search instead for 
Did you mean: 

Read Master Data + AMDP Routine

Former Member
0 Kudos

Hi,

i would like to read master data (0CUST_SALES) from Attr.. My model look like below.

can anyone write me AMDP-Expert Routine for this scenario?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

erdempekcan
Contributor

Hi Sacha,

Please find a sample below. The order of the fields should be on the exact level of your data.
You may edit the join conditions.

outTab = select
intab."CUSTOMER",
intab."ZMERKMAL1",
...
custsales."CUST_SALES",
"RECORD"
FROM :inTab as intab
JOIN "/BI0/PCUST_SALES" as custsales
ON intab."CUSTOMER" = custsales."CUSTOMER";

Former Member
0 Kudos

Hi Erdem,

Thanks a lot for your Help. I am not friendly AMDP-Script, Could you please write me exact script?

Thanks

Sascha

erdempekcan
Contributor
0 Kudos

Hi Sacha,

Once you activate the script in transformation, it will be available on HANA studio side as a 1:1 mapping.
You just need to add the JOIN condition and the required field from the attribute field.

Former Member
0 Kudos

Hi Erdem,

Thanks for your Help. Tesekkur ederim 🙂

Could you please write me for this scenario a AMDP-Expert Routine? aDSO "ZR1ADSO" should be join from 2 aDSO's.

Thanks alot

Sascha

erdempekcan
Contributor
0 Kudos

Hi Sascha,

You don't need to create a "read-from" scenario for this case. You've same key field from both sources and non-key fields are not overlapping. Simply create two transformations from each of them to target ZR1ADSO. Once you load the data from these sources your data will be "merged" in the target.

Regards,
Erdem

Former Member
0 Kudos

Hi Erdem,

Thank you very much. Can i ask you one more scenario about my issue? i would like to merge 2 different aDSOs to 1 aDSO target with AMDP-Routine. If i am used two transformation to 1 target , i got report-1. But i wanna merge all of them to one like Report-2. it is important for us also Currency. Thanks alot for your help!

Best Regards Sascha

Answers (1)

Answers (1)

erdempekcan
Contributor

Hi Sacha,

Let's go this way: Please check the following samples and activate your HANA expert routine.
Edit your outtab mapping according to your lookup. If it doesn't work, please paste here the code and let's check what's wrong about it.

Instead of creating a code for you from scratch, this will be much more efficient.

https://blogs.sap.com/2015/05/03/create-sql-script-based-transformations-in-bw-74-sp9-on-hana/

https://blogs.sap.com/2016/05/24/hana-based-bw-transformation/

https://archive.sap.com/discussions/thread/3624514

Former Member
0 Kudos

Hi Erdem,

thanks alot for ur links. But i dont have sql-skill thats why i cant write it. I would just like to understand logic.