Hello Raghav Haralalka - sID,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you would like to know how you can fix commas (,) being read as decimal(.) on ADF while reading from SAP BW via MDX.
Since the SAP BW MDX connector in Azure Data Factory (ADF) retrieves data as parsed numeric values based on SAP's internal formatting and the system user's locale.
- Adjust SAP BW User Locale Settings The number formatting is determined by the user account used by ADF to connect to SAP BW. To adjust this:
- Access SAP GUI:
- Navigate to the SU01 transaction.
- Enter the user ID used for the ADF connection.
- Set Decimal Notation:
- Under the Defaults tab, set Decimal Notation to
X 1,234,567.89
(dot as decimal, comma as thousands) or to the appropriate format likeY 1.234.567,89
if required by ADF. - https://community.sap.com/t5/technology-q-a/how-to-change-decimal-places/qaq-p/1885508
- Under the Defaults tab, set Decimal Notation to
- Access SAP GUI:
- You can validate formatting in MDX Preview Tool using Test MDX Query:
- Use SAP transaction RSMDX or MDXTEST to test the MDX query used by ADF.
- Confirm that the returned numbers have the correct separators. - https://community.sap.com/t5/technology-q-a/global-setting-for-decimal-notation-setting/qaq-p/5085634
- This is a Post-Ingestion Type Control in ADF, if the SAP formatting cannot be changed, you can adjust the data after ingestion:
- Use Mapping Data Flow, in ADF, use a
Derived Column
transformation: replace(replace(toString(ColumnName), '.', ''), ',', '.') → toDouble() - This assumes
.
is the thousands separator and,
is the decimal separator - https://sapported.com/tutorials/technical/basis/how-to-change-decimals-notation-in-sap-using-transaction-su01/
- Use Mapping Data Flow, in ADF, use a
- File-Based Export Alternative is another means if MDX proves unmanageable, export data from SAP BW to a CSV file:
- Export Data: Use Open Hub or direct DSO extraction to export data to a CSV file.
- Control Formatting: Use a DelimitedText dataset in ADF to control decimal and thousand separator settings via dataset culture - https://community.sap.com/t5/technology-q-a/how-to-manage-decimal-notation-based-on-user-profile-in-sac-like-sap/qaq-p/13750240
Those links give more details and steps to the option available.
I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.