Skip to Content
0

Read Master Data + AMDP Routine

Jan 07 at 12:28 AM

272

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Erdem Pekcan Jan 08 at 09:03 AM
0

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";

Show 5 Share
10 |10000 characters needed characters left characters exceeded

Hi Erdem,

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

Thanks

Sascha

0

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.

0

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

0

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

0

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

0
Erdem Pekcan Jan 19 at 11:40 AM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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.

0