#!/usr/bin/python3 # -*- coding: utf-8 -*- import requests import json params ={ "DEST": { "DEST_ID": "EQMAN", "BUSS_TP": "MM002" }, "DATA": { "BUDAT_B": "20220501", "BUDAT_E": "20221201", "TMATNR": {}, "TMTART": {}, "TMATKL": {} } } username ="zinf_user" password="init@1234" url ="https://app.modernfarming.cn:7443/sap/Common/MM002/QueryMaterial/" response =requests.post(url, json=params,auth=(username,password)) print(response.text) # m =response.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])