cancel
Showing results for 
Search instead for 
Did you mean: 

Editing Supplier Invoice via SOAP Service

Former Member
565

I am currently trying to improve our intracompany payment within SAP By Design, that's why I post an additional Customer Invoice from one company to another, which is working fine.

BYD does out of the box create an SupplierInovoice based on the CustomerInvoice.

The last step I am struggeling with is now to add a CostDistribution to the Supplier Invoice Item to do the accounting directly on a project

The Supplier Invoice you can see in the attached screenshot.

So now when trying to update the Supplier Invoice I all the time get errors. I've already played around with the different action codes and status but never got it working to update the supplier invoice.

Below you can see one of my requests and the current error response

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global" xmlns:glob1="http://sap.com/xi/AP/Globalization">
   <soapenv:Header/>
   <soapenv:Body>
      <glob:SupplierInvoiceBundleMaintainRequest_sync>
         <BasicMessageHeader>
            <ID>GRER-65-2021</ID>
            <UUID>00163ebf-9012-1edb-a89c-2217ba9c261f</UUID>
         </BasicMessageHeader>
         <SupplierInvoice actionCode="02" itemListCompleteTransmissionIndicator="true">
            <BusinessTransactionDocumentTypeCode>127</BusinessTransactionDocumentTypeCode>
            <SupplierInvoiceID>GRER-65-2021</SupplierInvoiceID>
            <DocumentItemGrossAmountIndicator>false</DocumentItemGrossAmountIndicator>
           <Status>
               <DataEntryProcessingStatusCode>2</DataEntryProcessingStatusCode>
            </Status>
            <Item actionCode="02">
               <ItemID>1</ItemID>
               <UUID>00163ebf-9012-1edb-a89c-a2cfda790907</UUID>
               <BusinessTransactionDocumentItemTypeCode>002</BusinessTransactionDocumentItemTypeCode>
               <AccountingCodingBlockDistribution ActionCode="02" AccountingCodingBlockAssignmentListCompleteTransmissionIndicator="true">
                <TotalAmount currencyCode="EUR">300.00</TotalAmount>
                <TotalQuantity unitCode="HUR">5.00</TotalQuantity>
                  <AccountingCodingBlockAssignment ActionCode="02">
                  <Amount currencyCode="EUR">300.00</Amount>
                    <Quantity unitCode="HUR">5.00</Quantity>
                     <AccountingCodingBlockTypeCode>PRO</AccountingCodingBlockTypeCode>
                     <!--Optional:-->
                     <ProjectTaskKey>
                        <!--Optional:-->
                        <TaskID>KPRO-19</TaskID>
                     </ProjectTaskKey>
                      <!--Optional:-->
                     <ProjectReference>
                        <!--Optional:-->
                        <ProjectID>KPRO-19</ProjectID>
                     </ProjectReference>

                     <!--Optional:-->
                     <SalesOrderReference>
                        <ID>106</ID>
                        <!--Optional:-->
                        <ItemID>10</ItemID>
                     </SalesOrderReference>
                 </AccountingCodingBlockAssignment>
               </AccountingCodingBlockDistribution>
               </Item>
			<!--Item actionCode="04">
               
               <ItemID>1.1</ItemID>
               <BusinessTransactionDocumentItemTypeCode>002</BusinessTransactionDocumentItemTypeCode>
              <AccountingCodingBlockDistribution ActionCode="04">
                  
                  <AccountingCodingBlockAssignment ActionCode="04">
                     
                     <AccountingCodingBlockTypeCode>PRO</AccountingCodingBlockTypeCode>
                     
                     <ProjectTaskKey>
                        
                        <TaskID>KPRO-19</TaskID>
                     </ProjectTaskKey>
                      
                     <ProjectReference>
                        
                        <ProjectID>KPRO-19</ProjectID>
                     </ProjectReference>

                     <SalesOrderReference>
                        <ID>106</ID>
                       
                        <ItemID>10</ItemID>
                     </SalesOrderReference>
                 </AccountingCodingBlockAssignment>
               </AccountingCodingBlockDistribution>
		  </Item-->
		</SupplierInvoice>
      </glob:SupplierInvoiceBundleMaintainRequest_sync>
   </soapenv:Body>
</soapenv:Envelope>

Response:

<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
    <soap-env:Header/>
    <soap-env:Body>
        <n0:SupplierInvoiceBundleMaintainConfirmation_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:KRV:/1SAI/TAE23BCC1DE5DB542ABE5EE:804">
            <Log>
                <MaximumLogItemSeverityCode>3</MaximumLogItemSeverityCode>
                <Item>
                    <TypeID>007(/MBF_A2X_CORE/)</TypeID>
                    <CategoryCode>BPR.PUR</CategoryCode>
                    <SeverityCode>3</SeverityCode>
                    <Note>Missing key specification for processing node /SRMAP/LSIVX_SIV ItemAccountingCodingBlockDistribution.ACC_CODING_BLOCK_ASSGNMT</Note>
                </Item>
            </Log>
        </n0:SupplierInvoiceBundleMaintainConfirmation_sync>
    </soap-env:Body>
</soap-env:Envelope>

you have any idea on how to apply the cost dirstibution to a specific project via webservice and could provide a sample request for that?

Here is a screenshot of byd showing a part of the Supplier Invoice

Best regards,

Harald

Accepted Solutions (0)

Answers (0)