Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with Json Structure on ServiceLayer trying sending post request with more of 1 object

0 Kudos
176
  • SAP Managed Tags:
Hi community.

I have a problem when sending more of 1 JSON objects and the error is because of his structure. The current structure is this:

{
"BussinessPartner": [
{
"CardCode": "CE-14572394",
"CardName": "MARINO AUGUSTO",
"CardType": "C",
"GroupCode": "102",
"U_Evaluacion_Pv": "NOC",
"Currency": "$",
"U_GraCont": "N",
"FederalTaxID": "14572394",
"Phone1": "0",
"Cellular": "",
"EmailAddress": "dmqgarcia@gmail.com",
"U_HBT_Nombres": "MARINO AUGUSTO",
"U_HBT_Apellido1": "GOMEZ ",
"U_HBT_Apellido2": "ALVAREZ",
"U_HBT_Nacional": "1",
"U_HBT_TipExt": "0",
"U_HBT_TipEnt": "1",
"U_HBT_MunMed": "760147",
"U_HBT_TipDoc": "13",
"U_HBT_RegTrib": "RS",
"U_HBT_AutRet": "N",
"U_HBT_RegFis": "49",
"U_HBT_ResFis": "R-99-PN",
"U_HBT_MedPag": "ZZZ",
"PayTermsGrpCode": "8",
"FreeText": "Información transmistida desde el componente integrador KACTUS nomina",
"U_BPCO_RTC": "RS",
"U_BPCO_CS": "760147",
"U_BPCO_TDC": "13",
"U_BPCO_TP": "01",
"U_HBT_EnviaXMLFE": "Y",
"U_BPCO_Nombre": "MARINO AUGUSTO",
"U_BPCO_1Apellido": "GOMEZ ",
"U_BPCO_2Apellido": "ALVAREZ",
"U_HBT_MailRecep_FE": "dmqgarcia@gmail.com",
"BPAddresses": [
{
"AddressType": "S",
"AddressName": "CARTAGO ",
"County": "CO",
"Street": "CL 4 9 02",
"U_HBT_DirMM": "Y",
"U_HBT_MunMed": "760147",
"Block": "CARTAGO ",
"City": "CARTAGO ",
"StreetNo": "CL 4 9 02",
"ZipCode": "760147",
"State": "76"
},
{
"AddressType": "B",
"AddressName": "CARTAGO ",
"County": "CO",
"Street": "CL 4 9 02",
"U_HBT_DirMM": "Y",
"U_HBT_MunMed": "760147",
"Block": "CARTAGO ",
"City": "CARTAGO ",
"StreetNo": "CL 4 9 02",
"ZipCode": "760147",
"State": "76"
}
],
"ContactEmployees": [
{
"Name": "MARINO AUGUSTO",
"FirstName": "MARINO ",
"MiddleName": "AUGUSTO",
"LastName": "GOMEZ ALVAREZ",
"Address": "CL 4 9 02",
"Phone1": "0",
"MobilePhone": "",
"E_Mail": "dmqgarcia@gmail.com"
}
]
},
{
"CardCode": "DE-14572394",
"CardName": "MARINO AUGUSTO",
"CardType": "C",
"GroupCode": "102",
"U_Evaluacion_Pv": "NOC",
"Currency": "$",
"U_GraCont": "N",
"FederalTaxID": "14572394",
"Phone1": "0",
"Cellular": "",
"EmailAddress": "dmqgarcia@gmail.com",
"U_HBT_Nombres": "MARINO AUGUSTO",
"U_HBT_Apellido1": "GOMEZ ",
"U_HBT_Apellido2": "ALVAREZ",
"U_HBT_Nacional": "1",
"U_HBT_TipExt": "0",
"U_HBT_TipEnt": "1",
"U_HBT_MunMed": "760147",
"U_HBT_TipDoc": "13",
"U_HBT_RegTrib": "RS",
"U_HBT_AutRet": "N",
"U_HBT_RegFis": "49",
"U_HBT_ResFis": "R-99-PN",
"U_HBT_MedPag": "ZZZ",
"PayTermsGrpCode": "8",
"FreeText": "Información transmistida desde el componente integrador KACTUS nomina",
"U_BPCO_RTC": "RS",
"U_BPCO_CS": "760147",
"U_BPCO_TDC": "13",
"U_BPCO_TP": "01",
"U_HBT_EnviaXMLFE": "Y",
"U_BPCO_Nombre": "MARINO AUGUSTO",
"U_BPCO_1Apellido": "GOMEZ ",
"U_BPCO_2Apellido": "ALVAREZ",
"U_HBT_MailRecep_FE": "dmqgarcia@gmail.com",
"BPAddresses": [
{
"AddressType": "S",
"AddressName": "CARTAGO ",
"County": "CO",
"Street": "CL 4 9 02",
"U_HBT_DirMM": "Y",
"U_HBT_MunMed": "760147",
"Block": "CARTAGO ",
"City": "CARTAGO ",
"StreetNo": "CL 4 9 02",
"ZipCode": "760147",
"State": "76"
},
{
"AddressType": "B",
"AddressName": "CARTAGO ",
"County": "CO",
"Street": "CL 4 9 02",
"U_HBT_DirMM": "Y",
"U_HBT_MunMed": "760147",
"Block": "CARTAGO ",
"City": "CARTAGO ",
"StreetNo": "CL 4 9 02",
"ZipCode": "760147",
"State": "76"
}
],
"ContactEmployees": [
{
"Name": "MARINO AUGUSTO",
"FirstName": "MARINO ",
"MiddleName": "AUGUSTO",
"LastName": "GOMEZ ALVAREZ",
"Address": "CL 4 9 02",
"Phone1": "0",
"MobilePhone": "",
"E_Mail": "dmqgarcia@gmail.com"
}
]
}
]
} And this is the error mencionanted: { "error": { "code": -1005, "message": { "lang": "en-us", "value": "Data BussinessPartner not found" } } } How is the correct structure to send multiple JSON objects and not error? Thanks so much for reading.
0 REPLIES 0