Skip to Content
avatar image
Former Member

Query Customer Invoice Webservice on clearance status code

Hi !

I have a little problem right now, I'm trying to query the webservice querycustomerinvoicein to retrieve the invoices which are not yet Cleared but it doesn't work correctly (or maybe I'm not using it properly).

I would like to retrieve invoices that have an opened clearance status.

But it seems like it doesn't affect anything, even if I change the values in my request.

Here is an example on one of my soap calls, I should get the invoice with the id 407 only if the clearance status is set to open (which is not the case so I shouldn't get any result, the problem is that I always get my invoice 407, as if the Selection by clearing status code doesn't work :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">
   <soapenv:Header/>
   <soapenv:Body>
      <glob:CustomerInvoiceByElementsQuery_sync>
         <CustomerInvoiceSelectionByElements>
            <SelectionByID>
     <InclusionExclusionCode>I</InclusionExclusionCode>
     <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
     <LowerBoundaryIdentifier>407</LowerBoundaryIdentifier>
    </SelectionByID> 
            <glob:SelectionByClearingStatusCode>
                    <glob:InclusionExclusionCode>I</glob:InclusionExclusionCode>
                    <glob:IntervalBoundaryTypeCode>1</glob:IntervalBoundaryTypeCode>
                    <glob:LowerBoundaryCustomerInvoiceClearingStatusCode>1</glob:LowerBoundaryCustomerInvoiceClearingStatusCode>
            </glob:SelectionByClearingStatusCode>
        </CustomerInvoiceSelectionByElements>
      </glob:CustomerInvoiceByElementsQuery_sync>
   </soapenv:Body>
</soapenv:Envelope>
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • May 06, 2017 at 01:51 AM

    Hi Lee-Roy,

    XML looks quite correct.

    Did you try to leave the ID-parameter out? Does it then apply the ClearingStatusCode-parameter correctly?

    Usually, I would assume that multiple filters/restrictions on the same attribute should be ORed by default and filters/restrictions on different attributes to be ANDed, like you did expect it in this case. But maybe this doesn't apply here.

    Best,
    Pablo

    Add comment
    10|10000 characters needed characters exceeded