SAP Document and Reporting Compliance for Vietnam: The Service Provider’s Integration Blueprint

Are you onboarding as a third-party service provider (SP) for Document and Reporting Compliance (DRC) for Vietnam? This blog is your comprehensive playbook, explaining the SAP interface, valid statuses, request/response structures, and expected business scenarios. By following this guide, your integration will be seamless, standardized, and ready for production.

What You Will Achieve

By following the steps outlined in this blog, you will enable seamless and standardized electronic invoice exchange between SAP and your (SP) system, fully compatible with the DRC Cloud Edition Extensibility framework for Vietnam. This means your integration will receive electronic invoices from SAP in a SAP defined format, post which your system can validate and process them, and respond to SAP with the required statuses and payloads, ensuring full traceability and operational efficiency for our customers. Once these steps are in place, your system can then transfer the electronic invoices to the Vietnamese tax authority, i.e., the Vietnam General Department of Taxation (GDT), known in Vietnamese as Tổng cục Thuế.

API Endpoint Setup

Before you begin, ensure you have an API endpoint which wraps all possible operations for SAP to send and receive payloads, in the following format:

<host>/v1/command

Replace <host> with your actual service’s host or domain name. 

Example DRC for Vietnam Request Payload From SAP to SP  

When SAP calls your API, the request is in JSON format with HTTP POST operation and a content type of multipart/form-data. The payload includes processing instructions and additional document attachments in XML format, which could be accessed using the boundary value:

POST <host>/v1/command
Content-Type: multipart/form-data; boundary=boundary

–boundary
Content-Disposition: form-data; name=”payload”
Content-Type: application/json

{
“processInstance”: {
“id”: “<SAP Internal document ID>”,
“processType”: “CUSTOMER_INVOICE”,
“processSubtype”: “B2B”,
“countryRegion”: “VN”,
“processVersion”: “1.0.0”,
“action”: “TRANSMIT”,
“senderRegistrationID”: “123456789”,
“documents”: [
{
“id”: “<SAP Internal source key>”,
“type”: “SUBMIT_MAIN”
}
]
}
}
–boundary
Content-Disposition: form-data; name=”<SAP Internal document ID>+<SAP Internal source key>”; filename=”filename.XML”
Content-Type: application/xml
–boundary–

Where is the Actual XML?

The XML file is attached as a separate multipart section, not as a string in the JSON. Each entry in the documents array of the JSON is mapped by its id to a matched file (in this case, the invoice XML).

As you noticed in the example above, there is a field called “action” (e.g., TRANSMIT). SAP can send you one of three actions, and for each action, only certain response statuses are allowed from the service provider:

Action from SAP to SPPermitted Response Statuses from SP to SAPTRANSMITTRANSMITTED, REJECTEDRETRANSMITRETRANSMITTED, REJECTEDUPDATE_TRANSMISSION_STATUSTRANSMISSION_IN_PROGRESS, ACCEPTED, REJECTED
 
Below you’ll find a scenario map and guideline for when each status is to be returned:
StatusWhen to use / ScenarioRequired Additional Info TRANSMITTEDYour (SP) validations have passed.

INVOICE_NUMBER

REJECTED

Your (SP) or GDT validations have failed

Detailed error messages

RETRANSMITTEDYour (SP) validations have passed. This status is used when a retransmission action has occurred successfully from SAP to SP(in response to RETRANSMIT).

INVOICE_NUMBER

ACCEPTEDDocument approved by the Vietnamese tax authority (GDT). (Attach CQT code and PDF in documents.)

CQT_CODE and PDF attachment  

TRANSMISSION_IN_PROGRESSInvoice is not yet sent to tax authority or is still under evaluation (used only in UPDATE_TRANSMISSION_STATUS).

INVOICE_NUMBER

Example DRC for Vietnam Response Payloads From SP to SAP

Here are real-life examples for your API responses, aligned with the status scenario map above. The examples below cover all possible response scenarios required by SAP DRC Vietnam. Please note that, similar to request payload, response payload also has to be sent to SAP in multipart/form-data format.

1. TRANSMITTED

When your (Service Provider) validations have passed for a TRANSMIT action

{
“processInstance”: {
“id”: “<Internal document ID generated by SAP>”,
“processType”: “CUSTOMER_INVOICE”,
“processSubtype”: “B2B”,
“countryRegion”: “VN”,
“processVersion”: “1.0.0”,
“status”: “TRANSMITTED”,
“messages”: [
{
“code”: “INVOICE_NUMBER”,
“texts”: [
{
“language”: “EN”,
“text”: “<SP should update invoice number value here>”
}
]
}
]
}
}

2. RETRANSMITTED

When your (SP) validations have passed for a RETRANSMIT action

{
“processInstance”: {
“id”: “<Internal document ID generated by SAP>”,
“processType”: “CUSTOMER_INVOICE”,
“processSubtype”: “B2B”,
“countryRegion”: “VN”,
“processVersion”: “1.0.0”,
“status”: “RETRANSMITTED”,
“messages”: [
{
“code”: “INVOICE_NUMBER”,
“texts”: [
{
“language”: “EN”,
“text”: “<Update Invoice Number value here>”
}
]
}
]
}
}

3. REJECTED

a) When your (SP) validations fail for any action (TRANSMIT, RETRANSMIT or UPDATE_TRANSMISSION_STATUS)

{
“processInstance”: {
“id”: “<Internal document ID generated by SAP>”,
“processType”: “CUSTOMER_INVOICE”,
“processSubtype”: “B2B”,
“countryRegion”: “VN”,
“processVersion”: “1.0.0”,
“status”: “REJECTED”,
“messages”: [
{
“code”: “ERROR_SP”,
“texts”: [
{
“language”: “EN”,
“text”: “<Validation failed: Missing or invalid field in XML>”
}
]
}
]
}
}

b) When GDT validations fail for any action (TRANSMIT, RETRANSMIT or UPDATE_TRANSMISSION_STATUS)

{
“processInstance”: {
“id”: “<Internal document ID generated by SAP>”,
“processType”: “CUSTOMER_INVOICE”,
“processSubtype”: “B2B”,
“countryRegion”: “VN”,
“processVersion”: “1.0.0”,
“status”: “REJECTED”,
“messages”: [
{
“code”: “ERROR_GOV”,
“texts”: [
{
“language”: “EN”,
“text”: “<Validation failed: Invalid field in XML. This text can be in Vietnamese language as well>”
}
]
}
]
}
}

4. ACCEPTED

GDT approved the invoice (for UPDATE_TRANSMISSION_STATUS action)

{
“processInstance”: {
“id”: “<Internal document ID generated by SAP>”,
“processType”: “CUSTOMER_INVOICE”,
“processSubtype”: “B2B”,
“countryRegion”: “VN”,
“processVersion”: “1.0.0”,
“status”: “ACCEPTED”,
“messages”: [
{
“code”: “CQT_CODE”,
“texts”: [
{
“language”: “EN”,
“text”: “<Update Cơ quan thuế(CQT) Code value here>”
}
]
}
],
“documents”: [
{
“id”: “FINAL_RESPONSE”,
“type”: “PDF”,
“FileContent”: {
“filename”: “<invoice.pdf>”,
“content_type”: “PDF”,
“content”: “<Update PDF content here>”
}
}
]
}
}

5. TRANSMISSION_IN_PROGRESS

When Invoice is not yet sent to tax authority or is still under evaluation (for UPDATE_TRANSMISSION_STATUS action)

{
“processInstance”: {
“id”: “<Internal document ID generated by SAP>”,
“processType”: “CUSTOMER_INVOICE”,
“processSubtype”: “B2B”,
“countryRegion”: “VN”,
“processVersion”: “1.0.0”,
“status”: “TRANSMISSION_IN_PROGRESS”,
“messages”: [
{
“code”: “INVOICE_NUMBER”,
“texts”: [
{
“language”: “EN”,
“text”: “<Update Invoice Number value here>”
}
]
}
]
}
}

Note: For each status, you must use the exact values for fields such as code (e.g., ERROR_SPINVOICE_NUMBERCQT_CODE) as shown, these are not placeholders, but mandatory values for integration. Also, only include the documents tag in your response when it is shown in the example. If a scenario example omits documents, then you must not attach any additional documents for that particular response.

Mandatory Fields in Requests and Responses

Every interaction between SAP and the service provider relies on a standardized set of fields to ensure seamless communication and traceability.
When building your integration, make sure your API both receives and sends back the following key elements in every request and response:

FieldDescriptionidA unique identifier (UUID) for each transaction. Echo this back in every response.processTypeIndicates the document type; e.g., CUSTOMER_INVOICE.processSubtypeSpecifies the transaction context; e.g., B2B.countryRegionAlways VN for Vietnam compliance flows.processVersionSpecifies the document type version; e.g., 1.0.0senderRegistrationIDCustomer registration ID from the SAP request payload.statusYour response status, selected from the allowed list for the given action.documents[Conditional] List of all files included in the transmission (such as PDF attachments), each mapped by id.messages[Conditional] Use for conveying errors, validation feedback, or status updates, particularly when the transaction fails or the document is rejected.

Final Checklist to Go Live

Only allowed status codes per action are implemented.All required request/response fields are present and correctly formatted.Attachments are included and mapped precisely as described.Error handling and logging are robust.Your technical team is familiar with this blog and the latest SAP DRC extensibility help portal documentation.

By following this playbook, you’ll ensure rapid, compliant, and support-minimal onboarding for any Vietnam service provider integrating with SAP Document and Reporting Compliance Cloud Edition for Vietnam.

If in doubt, revisit this guide or SAP’s documentation. This is your single source of truth.

To know more details, refer to SAP Document and Reporting Compliance Cloud Edition Extensibility and Vietnam Cloud Integration.

I hope you find this information useful. You can leave a comment on this blog or follow us for more information about SAP Document and Reporting Compliance here in SAP Community.

Best regards,
Mahesh Varma

 

​ Are you onboarding as a third-party service provider (SP) for Document and Reporting Compliance (DRC) for Vietnam? This blog is your comprehensive playbook, explaining the SAP interface, valid statuses, request/response structures, and expected business scenarios. By following this guide, your integration will be seamless, standardized, and ready for production.What You Will AchieveBy following the steps outlined in this blog, you will enable seamless and standardized electronic invoice exchange between SAP and your (SP) system, fully compatible with the DRC Cloud Edition Extensibility framework for Vietnam. This means your integration will receive electronic invoices from SAP in a SAP defined format, post which your system can validate and process them, and respond to SAP with the required statuses and payloads, ensuring full traceability and operational efficiency for our customers. Once these steps are in place, your system can then transfer the electronic invoices to the Vietnamese tax authority, i.e., the Vietnam General Department of Taxation (GDT), known in Vietnamese as Tổng cục Thuế.API Endpoint SetupBefore you begin, ensure you have an API endpoint which wraps all possible operations for SAP to send and receive payloads, in the following format:<host>/v1/commandReplace <host> with your actual service’s host or domain name. Example DRC for Vietnam Request Payload From SAP to SP  When SAP calls your API, the request is in JSON format with HTTP POST operation and a content type of multipart/form-data. The payload includes processing instructions and additional document attachments in XML format, which could be accessed using the boundary value:POST <host>/v1/command
Content-Type: multipart/form-data; boundary=boundary

–boundary
Content-Disposition: form-data; name=”payload”
Content-Type: application/json

{
“processInstance”: {
“id”: “<SAP Internal document ID>”,
“processType”: “CUSTOMER_INVOICE”,
“processSubtype”: “B2B”,
“countryRegion”: “VN”,
“processVersion”: “1.0.0”,
“action”: “TRANSMIT”,
“senderRegistrationID”: “123456789”,
“documents”: [
{
“id”: “<SAP Internal source key>”,
“type”: “SUBMIT_MAIN”
}
]
}
}
–boundary
Content-Disposition: form-data; name=”<SAP Internal document ID>+<SAP Internal source key>”; filename=”filename.XML”
Content-Type: application/xml
–boundary–Where is the Actual XML?The XML file is attached as a separate multipart section, not as a string in the JSON. Each entry in the documents array of the JSON is mapped by its id to a matched file (in this case, the invoice XML).As you noticed in the example above, there is a field called “action” (e.g., TRANSMIT). SAP can send you one of three actions, and for each action, only certain response statuses are allowed from the service provider:Action from SAP to SPPermitted Response Statuses from SP to SAPTRANSMITTRANSMITTED, REJECTEDRETRANSMITRETRANSMITTED, REJECTEDUPDATE_TRANSMISSION_STATUSTRANSMISSION_IN_PROGRESS, ACCEPTED, REJECTED Below you’ll find a scenario map and guideline for when each status is to be returned:StatusWhen to use / ScenarioRequired Additional Info TRANSMITTEDYour (SP) validations have passed.INVOICE_NUMBERREJECTEDYour (SP) or GDT validations have failedDetailed error messagesRETRANSMITTEDYour (SP) validations have passed. This status is used when a retransmission action has occurred successfully from SAP to SP(in response to RETRANSMIT).INVOICE_NUMBERACCEPTEDDocument approved by the Vietnamese tax authority (GDT). (Attach CQT code and PDF in documents.)CQT_CODE and PDF attachment  TRANSMISSION_IN_PROGRESSInvoice is not yet sent to tax authority or is still under evaluation (used only in UPDATE_TRANSMISSION_STATUS).INVOICE_NUMBERExample DRC for Vietnam Response Payloads From SP to SAPHere are real-life examples for your API responses, aligned with the status scenario map above. The examples below cover all possible response scenarios required by SAP DRC Vietnam. Please note that, similar to request payload, response payload also has to be sent to SAP in multipart/form-data format.1. TRANSMITTEDWhen your (Service Provider) validations have passed for a TRANSMIT action{
“processInstance”: {
“id”: “<Internal document ID generated by SAP>”,
“processType”: “CUSTOMER_INVOICE”,
“processSubtype”: “B2B”,
“countryRegion”: “VN”,
“processVersion”: “1.0.0”,
“status”: “TRANSMITTED”,
“messages”: [
{
“code”: “INVOICE_NUMBER”,
“texts”: [
{
“language”: “EN”,
“text”: “<SP should update invoice number value here>”
}
]
}
]
}
}2. RETRANSMITTEDWhen your (SP) validations have passed for a RETRANSMIT action{
“processInstance”: {
“id”: “<Internal document ID generated by SAP>”,
“processType”: “CUSTOMER_INVOICE”,
“processSubtype”: “B2B”,
“countryRegion”: “VN”,
“processVersion”: “1.0.0”,
“status”: “RETRANSMITTED”,
“messages”: [
{
“code”: “INVOICE_NUMBER”,
“texts”: [
{
“language”: “EN”,
“text”: “<Update Invoice Number value here>”
}
]
}
]
}
}3. REJECTEDa) When your (SP) validations fail for any action (TRANSMIT, RETRANSMIT or UPDATE_TRANSMISSION_STATUS){
“processInstance”: {
“id”: “<Internal document ID generated by SAP>”,
“processType”: “CUSTOMER_INVOICE”,
“processSubtype”: “B2B”,
“countryRegion”: “VN”,
“processVersion”: “1.0.0”,
“status”: “REJECTED”,
“messages”: [
{
“code”: “ERROR_SP”,
“texts”: [
{
“language”: “EN”,
“text”: “<Validation failed: Missing or invalid field in XML>”
}
]
}
]
}
}b) When GDT validations fail for any action (TRANSMIT, RETRANSMIT or UPDATE_TRANSMISSION_STATUS){
“processInstance”: {
“id”: “<Internal document ID generated by SAP>”,
“processType”: “CUSTOMER_INVOICE”,
“processSubtype”: “B2B”,
“countryRegion”: “VN”,
“processVersion”: “1.0.0”,
“status”: “REJECTED”,
“messages”: [
{
“code”: “ERROR_GOV”,
“texts”: [
{
“language”: “EN”,
“text”: “<Validation failed: Invalid field in XML. This text can be in Vietnamese language as well>”
}
]
}
]
}
}4. ACCEPTEDGDT approved the invoice (for UPDATE_TRANSMISSION_STATUS action){
“processInstance”: {
“id”: “<Internal document ID generated by SAP>”,
“processType”: “CUSTOMER_INVOICE”,
“processSubtype”: “B2B”,
“countryRegion”: “VN”,
“processVersion”: “1.0.0”,
“status”: “ACCEPTED”,
“messages”: [
{
“code”: “CQT_CODE”,
“texts”: [
{
“language”: “EN”,
“text”: “<Update Cơ quan thuế(CQT) Code value here>”
}
]
}
],
“documents”: [
{
“id”: “FINAL_RESPONSE”,
“type”: “PDF”,
“FileContent”: {
“filename”: “<invoice.pdf>”,
“content_type”: “PDF”,
“content”: “<Update PDF content here>”
}
}
]
}
}5. TRANSMISSION_IN_PROGRESSWhen Invoice is not yet sent to tax authority or is still under evaluation (for UPDATE_TRANSMISSION_STATUS action){
“processInstance”: {
“id”: “<Internal document ID generated by SAP>”,
“processType”: “CUSTOMER_INVOICE”,
“processSubtype”: “B2B”,
“countryRegion”: “VN”,
“processVersion”: “1.0.0”,
“status”: “TRANSMISSION_IN_PROGRESS”,
“messages”: [
{
“code”: “INVOICE_NUMBER”,
“texts”: [
{
“language”: “EN”,
“text”: “<Update Invoice Number value here>”
}
]
}
]
}
}Note: For each status, you must use the exact values for fields such as code (e.g., ERROR_SP, INVOICE_NUMBER, CQT_CODE) as shown, these are not placeholders, but mandatory values for integration. Also, only include the documents tag in your response when it is shown in the example. If a scenario example omits documents, then you must not attach any additional documents for that particular response.Mandatory Fields in Requests and ResponsesEvery interaction between SAP and the service provider relies on a standardized set of fields to ensure seamless communication and traceability.When building your integration, make sure your API both receives and sends back the following key elements in every request and response:FieldDescriptionidA unique identifier (UUID) for each transaction. Echo this back in every response.processTypeIndicates the document type; e.g., CUSTOMER_INVOICE.processSubtypeSpecifies the transaction context; e.g., B2B.countryRegionAlways VN for Vietnam compliance flows.processVersionSpecifies the document type version; e.g., 1.0.0senderRegistrationIDCustomer registration ID from the SAP request payload.statusYour response status, selected from the allowed list for the given action.documents[Conditional] List of all files included in the transmission (such as PDF attachments), each mapped by id.messages[Conditional] Use for conveying errors, validation feedback, or status updates, particularly when the transaction fails or the document is rejected.Final Checklist to Go LiveOnly allowed status codes per action are implemented.All required request/response fields are present and correctly formatted.Attachments are included and mapped precisely as described.Error handling and logging are robust.Your technical team is familiar with this blog and the latest SAP DRC extensibility help portal documentation.By following this playbook, you’ll ensure rapid, compliant, and support-minimal onboarding for any Vietnam service provider integrating with SAP Document and Reporting Compliance Cloud Edition for Vietnam.If in doubt, revisit this guide or SAP’s documentation. This is your single source of truth.To know more details, refer to SAP Document and Reporting Compliance Cloud Edition Extensibility and Vietnam Cloud Integration.I hope you find this information useful. You can leave a comment on this blog or follow us for more information about SAP Document and Reporting Compliance here in SAP Community.Best regards,Mahesh Varma   Read More Technology Blog Posts by SAP articles 

#SAP

#SAPTechnologyblog

You May Also Like

More From Author