Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Connect with SAP R/3 module using Power BI

Hello all,

 

I would like to get the data from SAP R/3 module using power bi.

When i googled it I came to know that, this is not yet implemented in power bi.

here is the link.

https://community.powerbi.com/t5/Integrations-with-Files-and/Connecting-SAP-R-3-SAP-ECC-Modules-from...

 

But there is team who is able to connect with SAP R/3 module and consume the data using webservice.

This is the m language script that we have got on search.

Web.Contents("http://some.url", [Headers=[ #"Content-Type"="application/json"]])

 

OUR json consist of following input parameters to be passed in body

input:

{

          "projectCode":"xyz",

         "index":0,

         "searchString":"",

          "filterColumn":"",

          "filterType":"" }

 

we dont know how to pass these parameters while consuming  this web service URL .

Please suggest.

Thanks

Mohan.V

1 ACCEPTED SOLUTION

@Anonymous

Here's a sample sending a request with JSON in the body which works in my test before this post. You Power Query code looks good. As the response message shows "invalid input parameters", I'd doubt you've not sent every parameter the API expects.

 

I'm not familiar with your SAP R/3 web service, just ensure that the API can be accessed in other API test tools, like POSTMAN. After that you can tweak the API by using Power Query.

 

let
    AuthKey = "Bearer youTokenHere",
    url = "https://api.powerbi.com/v1.0/myorg/datasets",
    body = "{""name"": ""SalesMarketing2"",""tables"":   
    [{""name"": ""Product"", ""columns"":   
        [{ ""name"": ""ProductID"", ""dataType"": ""Int64""},  
         { ""name"": ""Name"", ""dataType"": ""string""},  
         { ""name"": ""Category"", ""dataType"": ""string""},  
         { ""name"": ""IsCompete"", ""dataType"": ""bool""},  
         { ""name"": ""ManufacturedOn"", ""dataType"": ""DateTime""}  
        ]  
      }  
    ]  
}",
    Source = Json.Document(Web.Contents(url,[
             
         Headers = [#"Authorization"=AuthKey ,
                    #"Content-Type"="application/json"],
         Content = Text.ToBinary(body) 
             ]   
        ))
in
    Source

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

 

I am able to hit the webservice url

but getting invalid parameters with zero results.

here is the m script that i have used.

let
    
    url = "https://url",
    body = "{
	""query"":[
{
	""EMP_ID"": ""if"",
	""userName"":""name"",
	""lastAccessedDateTime"":""2016-10-18T07:10:40.000Z"",
        ""deviceId"":""id"",
   	""appKey"":""key"",
	""tokenid"":""kkshdsfif"",
        ""appType"":""web""
}
]
}",
    Source = Json.Document(Web.Contents(url,[
             Headers = [#"ContentType"="application/json"]
         Content = Text.ToBinary(body) 
             ]   
        ))
in
    Source

 

Here is the output 

Capture.PNG

 

Can anybody please suggest me.

Mohan.V

@Anonymous

Here's a sample sending a request with JSON in the body which works in my test before this post. You Power Query code looks good. As the response message shows "invalid input parameters", I'd doubt you've not sent every parameter the API expects.

 

I'm not familiar with your SAP R/3 web service, just ensure that the API can be accessed in other API test tools, like POSTMAN. After that you can tweak the API by using Power Query.

 

let
    AuthKey = "Bearer youTokenHere",
    url = "https://api.powerbi.com/v1.0/myorg/datasets",
    body = "{""name"": ""SalesMarketing2"",""tables"":   
    [{""name"": ""Product"", ""columns"":   
        [{ ""name"": ""ProductID"", ""dataType"": ""Int64""},  
         { ""name"": ""Name"", ""dataType"": ""string""},  
         { ""name"": ""Category"", ""dataType"": ""string""},  
         { ""name"": ""IsCompete"", ""dataType"": ""bool""},  
         { ""name"": ""ManufacturedOn"", ""dataType"": ""DateTime""}  
        ]  
      }  
    ]  
}",
    Source = Json.Document(Web.Contents(url,[
             
         Headers = [#"Authorization"=AuthKey ,
                    #"Content-Type"="application/json"],
         Content = Text.ToBinary(body) 
             ]   
        ))
in
    Source

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.