<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Connect with SAP R/3 module using Power BI in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Connect-with-SAP-R-3-module-using-Power-BI/m-p/142323#M4909</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to hit the webservice url&lt;/P&gt;&lt;P&gt;but getting invalid parameters with zero results.&lt;/P&gt;&lt;P&gt;here is the m script that i have used.&lt;/P&gt;&lt;PRE&gt;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&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the output&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline"&gt;&lt;SPAN class="lia-message-image-wrapper"&gt;&lt;IMG src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/33001i89ED20F5FBA12C5C/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anybody please suggest me.&lt;/P&gt;&lt;P&gt;Mohan.V&lt;/P&gt;</description>
    <pubDate>Tue, 14 Mar 2017 14:01:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-03-14T14:01:38Z</dc:date>
    <item>
      <title>Connect with SAP R/3 module using Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Connect-with-SAP-R-3-module-using-Power-BI/m-p/142144#M4904</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to get the data from SAP R/3 module using power bi.&lt;/P&gt;&lt;P&gt;When i googled it I came to know that, this is not yet implemented in power bi.&lt;/P&gt;&lt;P&gt;here is the link.&lt;/P&gt;&lt;P&gt;&lt;A title="Power bi with R/3" href="https://community.fabric.microsoft.com/t5/Integrations-with-Files-and/Connecting-SAP-R-3-SAP-ECC-Modules-from-Power-BI/td-p/113497" target="_self"&gt;https://community.powerbi.com/t5/Integrations-with-Files-and/Connecting-SAP-R-3-SAP-ECC-Modules-from-Power-BI/td-p/113497.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But there is team who is able to connect with SAP R/3 module and consume the data using webservice.&lt;/P&gt;&lt;P&gt;This is the m language script that we have got on search.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;Web.Contents("&lt;A title="" href="http://some.url/" target="_blank" rel="nofollow noopener noreferrer"&gt;http://some.url&lt;/A&gt;", [Headers=[ #"Content-Type"="application/json"]])&lt;/SPAN&gt;​&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OUR json consist of following input parameters to be passed in body&lt;/P&gt;&lt;P&gt;input:&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "projectCode":"xyz",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "index":0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "searchString":"",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "filterColumn":"",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "filterType":"" }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we dont know how to pass these parameters while consuming&amp;nbsp; this web service URL .&lt;/P&gt;&lt;P&gt;Please suggest.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Mohan.V&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 09:34:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Connect-with-SAP-R-3-module-using-Power-BI/m-p/142144#M4904</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-14T09:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: Connect with SAP R/3 module using Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Connect-with-SAP-R-3-module-using-Power-BI/m-p/142323#M4909</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to hit the webservice url&lt;/P&gt;&lt;P&gt;but getting invalid parameters with zero results.&lt;/P&gt;&lt;P&gt;here is the m script that i have used.&lt;/P&gt;&lt;PRE&gt;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&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the output&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline"&gt;&lt;SPAN class="lia-message-image-wrapper"&gt;&lt;IMG src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/33001i89ED20F5FBA12C5C/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anybody please suggest me.&lt;/P&gt;&lt;P&gt;Mohan.V&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 14:01:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Connect-with-SAP-R-3-module-using-Power-BI/m-p/142323#M4909</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-14T14:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Connect with SAP R/3 module using Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Connect-with-SAP-R-3-module-using-Power-BI/m-p/142874#M4921</link>
      <description>&lt;P&gt;@Anonymous&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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 &lt;A href="https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?hl=en" target="_self"&gt;POSTMAN&lt;/A&gt;. After that you can tweak the API by using Power Query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;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&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 08:47:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Connect-with-SAP-R-3-module-using-Power-BI/m-p/142874#M4921</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-03-15T08:47:38Z</dc:date>
    </item>
  </channel>
</rss>

