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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
joviano
Helper I
Helper I

Json Sap Parametros

Ola, tenho uma API que o SAP me manda. Porem ela possui 4 parametros.

Ex.

"http://sapprd.xxxxxx.corp:xxxx/wsse/inves"

{
"I_AREA": "xxxx",
"I_EMPRESA": "0001",
"I_DT_INICIAL": "20211201",
"I_DT_FINAL": "20211231"
}

 

Uso desta forma, pasando usuario e senha via Basic no Insomnia, e ele tras o resultado esperado.

 

Como faz para usar os parametros no powerquery, pois conectando via web, ele passa, mas nao sei onde colocar os parametros.

1 ACCEPTED SOLUTION
joviano
Helper I
Helper I

Consegui resolver passando direto na URL os parametros.

ficando assim: 

http://sapprd.xxxxxx.corp:xxxx/wsse/inves?I_AREA=XXXX&I_EMPRESA=0001......

 

Porem, ao criar parametros dentro do power query, e substituir o resultado da empresa por exemplo, ele nao entende, nao tras nada. agora se digitar o 0001 direto, ai sim da certo. Com parametro tipo texto p_id_empresa, ai nao.

View solution in original post

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

Hi @joviano ,

 

Thank you very much for your feedback and for providing the appropriate solution. If the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.


Looking forward to your feedback.😊


Best Regards,
Henry

joviano
Helper I
Helper I

Consegui resolver fazendo assim:

 

QUERY = [I_AREA=P_I_AREA,I_EMPRESA=P_I_EMPRESA,I_DT_INICIAL=P_I_DT_INICIAL,I_DT_FINAL=P_I_DT_FINAL],
Fonte = Table.FromColumns({Lines.FromBinary(Web.Contents("http://xxx.xxxxx.corp:8000/wsse/inves",[Query=QUERY]),null, null, 1252)}),

joviano
Helper I
Helper I

Consegui resolver passando direto na URL os parametros.

ficando assim: 

http://sapprd.xxxxxx.corp:xxxx/wsse/inves?I_AREA=XXXX&I_EMPRESA=0001......

 

Porem, ao criar parametros dentro do power query, e substituir o resultado da empresa por exemplo, ele nao entende, nao tras nada. agora se digitar o 0001 direto, ai sim da certo. Com parametro tipo texto p_id_empresa, ai nao.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors