SAP Knowledge Base Article - Public

2976071 - QueryDocumentOutputRequestIn Returns no Results

Symptom

You are trying to retrieve the document UUID of the Output Document (PDF) of a Customer Invoice via the web service QueryDocumentOutputRequestIn and the operation FindByElements but no results are displayed in the response payload.

Environment

SAP Business ByDesign

Reproducing the Issue

Step 1: Get the invoice UUID via web service QueryCustomerInvoiceIn to get the invoice UUID.

In our example we will query the customer invoice XYZ (XYZ represents the Invoice ID).

Payload:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">

<soap:Header/>

<soap:Body>

<glob:CustomerInvoiceByElementsQuery_sync>

<CustomerInvoiceSelectionByElements>

<SelectionByID>

<InclusionExclusionCode>I</InclusionExclusionCode>

<IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>

<LowerBoundaryIdentifier>XYZ</LowerBoundaryIdentifier>

</SelectionByID>

</CustomerInvoiceSelectionByElements>

</glob:CustomerInvoiceByElementsQuery_sync>

</soap:Body>

</soap:Envelope>

 

Step 2: Retrieve the Invoice UUID from the Response  <UUID>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</UUID>

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">

<soapenv:Header/>

<soapenv:Body>

<glob:DocumentOutputRequestByElementsQuery_sync>

<DocumentOutputRequestSelectionByElements>

<SelectionByDocumentUUID>

<InclusionExclusionCode>I</InclusionExclusionCode>

<IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>

<LowerBoundaryUUID>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</LowerBoundaryUUID>

</SelectionByDocumentUUID>

</DocumentOutputRequestSelectionByElements>

<ProcessingConditions>

<QueryHitsUnlimitedIndicator>true</QueryHitsUnlimitedIndicator>

</ProcessingConditions>

</glob:DocumentOutputRequestByElementsQuery_sync>

</soapenv:Body>

</soapenv:Envelope>

Step 3: get the Document UUID via the web service ‘QueryDocumentOutputRequestIn’ to get the document UUID.

operation name: FindByElements

Continuing with the example, the customer invoice UUID is 00163e7c-932c-1eea-b4f4-4e7dbffd5860

 

Step 4: no results returned in the response Payload

<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">

<soap-env:Header/>

<soap-env:Body>

<n0:DocumentOutputRequestByElementsResponse_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:LVB:/1SAI/TASB77DFAEF292DE455BC6A:804">

<ProcessingConditions>

<ReturnedQueryHitsNumberValue>0</ReturnedQueryHitsNumberValue>

<MoreHitsAvailableIndicator>false</MoreHitsAvailableIndicator>

</ProcessingConditions>

</n0:DocumentOutputRequestByElementsResponse_sync>

</soap-env:Body>

</soap-env:Envelope>

Cause

  • The Output Document is only created when a customer invoice is released.
  • If the invoice is not released and no Output Document is created the web service will display no results. 

Customer Invoice XYZ is Not Released and therefore has no Output Document. Hence, no results are returned in the query QueryDocumentOutputRequestIn.

Resolution

You need to ensure that the Customer Invoice you are querying is Released and the Output Document was created in the Output History of the Customer Invoice.

See Also

Blog: Web Service Calls to Get Customer Invoice PDF from ByDesign

Keywords

QueryDocumentOutputRequestIn; Query; web service; PDF; Output; No results; No data; UUID; , KBA , AP-RC-OUT , Output Management , SRD-CRM-INV , Customer Invoicing , Problem

Product

SAP Business ByDesign all versions