cancel
Showing results for 
Search instead for 
Did you mean: 

Namespace prefix issue in UBL Reference Schemas in CPI after mapping

Akash_Nagargoje
Discoverer
0 Kudos

Hi All,

We are using one to one mapping in sap CPI, and we have the UBL structure in mapping. We need a namespace prefix for each field after mapping in CPI, we are getting expected output in PI but in CPI we are not getting the expected output. Please find the below payloads before and after mapping from PI and CPI.

Payload before mapping:

<?xml version="1.0" encoding="UTF-8"?>
<Waybill xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns="urn:oasis:names:specification:ubl:schema:xsd:Waybill-2">
<cbc:UBLVersionID>2.1</cbc:UBLVersionID>
<cbc:ID>8508445428</cbc:ID>
<cbc:IssueDate>2024-03-25</cbc:IssueDate>
<cac:Shipment>
<cbc:ID>2365336</cbc:ID>
</cac:Shipment>
<cac:DocumentReference>
<cbc:ID>8508445428</cbc:ID>
<cbc:DocumentTypeCode>AAS</cbc:DocumentTypeCode>
</cac:DocumentReference>
<cac:DocumentReference>
<cbc:ID>2365336</cbc:ID>
<cbc:DocumentTypeCode>CU</cbc:DocumentTypeCode>
</cac:DocumentReference>
<cac:DocumentReference>
<cbc:ID>202403260000</cbc:ID>
<cbc:DocumentTypeCode>DTM-133</cbc:DocumentTypeCode>
</cac:DocumentReference>
</Waybill>

 

Payload after mapping from CPI:

<?xml version="1.0" encoding="UTF-8"?>
<ns0:Waybill xmlns:ns0="urn:oasis:names:specification:ubl:schema:xsd:Waybill-2">
<UBLVersionID>2.1</UBLVersionID>
<ID>8508445428</ID>
<IssueDate>2024-03-25</IssueDate>
<Shipment>
<ID>2365336</ID>
</Shipment>
<DocumentReference>
<ID>8508445428</ID>
<DocumentTypeCode>AAS</DocumentTypeCode>
</DocumentReference>
<DocumentReference>
<ID>2365336</ID>
<DocumentTypeCode>CU</DocumentTypeCode>
</DocumentReference>
<DocumentReference>
<ID>202403260000</ID>
<DocumentTypeCode>DTM-133</DocumentTypeCode>
</DocumentReference>
</ns0:Waybill>

 

Payload after mapping from PI:

<?xml version="1.0" encoding="UTF-8"?>
<ns0:Waybill xmlns:ns0="urn:oasis:names:specification:ubl:schema:xsd:Waybill-2"><ns1:UBLVersionID xmlns:ns1="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">2.1</ns1:UBLVersionID><ns1:ID xmlns:ns1="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">8508445428</ns1:ID><ns1:IssueDate xmlns:ns1="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">2024-03-25</ns1:IssueDate><ns2:Shipment xmlns:ns2="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"><ns1:ID xmlns:ns1="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">2365336</ns1:ID></ns2:Shipment><ns2:DocumentReference xmlns:ns2="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"><ns1:ID xmlns:ns1="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">8508445428</ns1:ID><ns1:DocumentTypeCode xmlns:ns1="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">AAS</ns1:DocumentTypeCode></ns2:DocumentReference><ns2:DocumentReference xmlns:ns2="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"><ns1:ID xmlns:ns1="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">2365336</ns1:ID><ns1:DocumentTypeCode xmlns:ns1="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">CU</ns1:DocumentTypeCode></ns2:DocumentReference><ns2:DocumentReference xmlns:ns2="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"><ns1:ID xmlns:ns1="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">202403260000</ns1:ID><ns1:DocumentTypeCode xmlns:ns1="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">DTM-133</ns1:DocumentTypeCode></ns2:DocumentReference></ns0:Waybill>

 

Please let me know how to fix the namespace prefix issue in mapping. Target system needs the namespace prefix for all the fields in CPI.

Accepted Solutions (0)

Answers (1)

Answers (1)

Sriprasadsbhat
Active Contributor
0 Kudos

Hello ,

Please check your target schema and I think its missing namespace declaration which you are expecting.

Regards,

Sriprasad Shivaram Bhat

Akash_Nagargoje
Discoverer
0 Kudos

Hello,

Thanks for the reply, I got the solution after uploading the WSDL from service interface.