12345678910111213141516171819202122232425262728293031 |
- #!/usr/bin/python3
- # -*- coding: utf-8 -*-
- import requests
- import json
- params ={
- "DEST": {
- "DEST_ID": "EQMAN",
- "BUSS_TP": "MM002",
- "BUKRS":"1005"
- },
- "DATA": {
- "BUDAT_B": "20220101",
- "BUDAT_E": "20220701",
- "TMATNR": {},
- "TMTART": {},
- "TMATKL": {}
- }
- }
- username ="zinf_user"
- password="init@1234"
- url ="https://app.modernfarming.cn:7443/sap/Common/MM004/QuerySupplier/"
- resp =requests.post(url, json=params,auth=(username,password))
- print(resp.text)
- # m =resp.json()
- # for k in m["DEST"]:
- # print(k,m["DEST"][k])
- # for k in m["DATA"]["TMARA"]:
- # for mater in k:
- # print(mater,k[mater])
|