Forum Discussion

joviano's avatar
joviano
Helper I
4 years ago
Solved

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.

3 Replies

  • 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)}),

  • v-henryk-mstf's avatar
    v-henryk-mstf
    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