Billing documents collectively refer to customer invoices, credit memos, debit memos, pro forma invoices, and the related cancellation documents. This service, which offers both synchronous and asynchronous processing, makes billing document data available through its header, item, and partner entities. You can extend it with custom fields via key user extensibility.
You can use this service to do the following:
- Create billing documents with reference to billable SD documents in your system
- Read most billing document fields at header and item level
- Update specific billing document fields, including custom fields added through extensibility
- Post billing documents to financial accounting to create the corresponding journal entries
PHP 7.4 and later. Should also work with PHP 8.0.
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php
:
<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: BasicAuth
$config = BeLenka\SAP\BillingDocumentODV4\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new BeLenka\SAP\BillingDocumentODV4\Api\BatchRequestsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->batchPost();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BatchRequestsApi->batchPost: ', $e->getMessage(), PHP_EOL;
}
All URIs are relative to https://:/sap/opu/odata4/sap/api_billingdocument/srvd_a2x/sap/billingdocument/0001
Class | Method | HTTP request | Description |
---|---|---|---|
BatchRequestsApi | batchPost | POST /$batch | Send a group of requests |
HeaderApi | billingDocumentBillingDocumentGet | GET /BillingDocument/{BillingDocument} | Get entity from BillingDocument by key |
HeaderApi | billingDocumentBillingDocumentItemGet | GET /BillingDocument/{BillingDocument}/_Item | Get entities from related _Item |
HeaderApi | billingDocumentBillingDocumentPartnerGet | GET /BillingDocument/{BillingDocument}/_Partner | Get entities from related _Partner |
HeaderApi | billingDocumentBillingDocumentPatch | PATCH /BillingDocument/{BillingDocument} | Update entity in BillingDocument |
HeaderApi | billingDocumentBillingDocumentSAPSelfPostToAccountingPost | POST /BillingDocument/{BillingDocument}/SAP__self.PostToAccounting | Invoke action PostToAccounting |
HeaderApi | billingDocumentGet | GET /BillingDocument | Get entities from BillingDocument |
HeaderApi | billingDocumentItemBillingDocumentBillingDocumentItemBillingDocumentGet | GET /BillingDocumentItem/{BillingDocument}/{BillingDocumentItem}/_BillingDocument | Get related _BillingDocument |
HeaderApi | billingDocumentItemPartnerBillingDocumentBillingDocumentItemPartnerFunctionBillingDocumentGet | GET /BillingDocumentItemPartner/{BillingDocument}/{BillingDocumentItem}/{PartnerFunction}/_BillingDocument | Get related _BillingDocument |
HeaderApi | billingDocumentPartnerBillingDocumentPartnerFunctionBillingDocumentGet | GET /BillingDocumentPartner/{BillingDocument}/{PartnerFunction}/_BillingDocument | Get related _BillingDocument |
HeaderApi | billingDocumentSAPSelfCreateFromSDDocumentPost | POST /BillingDocument/SAP__self.CreateFromSDDocument | Invoke action CreateFromSDDocument |
HeaderPartnersApi | billingDocumentBillingDocumentPartnerGet | GET /BillingDocument/{BillingDocument}/_Partner | Get entities from related _Partner |
HeaderPartnersApi | billingDocumentPartnerBillingDocumentPartnerFunctionBillingDocumentGet | GET /BillingDocumentPartner/{BillingDocument}/{PartnerFunction}/_BillingDocument | Get related _BillingDocument |
HeaderPartnersApi | billingDocumentPartnerBillingDocumentPartnerFunctionGet | GET /BillingDocumentPartner/{BillingDocument}/{PartnerFunction} | Get entity from BillingDocumentPartner by key |
HeaderPartnersApi | billingDocumentPartnerGet | GET /BillingDocumentPartner | Get entities from BillingDocumentPartner |
ItemPartnersApi | billingDocumentItemBillingDocumentBillingDocumentItemItemPartnerGet | GET /BillingDocumentItem/{BillingDocument}/{BillingDocumentItem}/_ItemPartner | Get entities from related _ItemPartner |
ItemPartnersApi | billingDocumentItemPartnerBillingDocumentBillingDocumentItemPartnerFunctionBillingDocumentGet | GET /BillingDocumentItemPartner/{BillingDocument}/{BillingDocumentItem}/{PartnerFunction}/_BillingDocument | Get related _BillingDocument |
ItemPartnersApi | billingDocumentItemPartnerBillingDocumentBillingDocumentItemPartnerFunctionGet | GET /BillingDocumentItemPartner/{BillingDocument}/{BillingDocumentItem}/{PartnerFunction} | Get entity from BillingDocumentItemPartner by key |
ItemPartnersApi | billingDocumentItemPartnerBillingDocumentBillingDocumentItemPartnerFunctionItemGet | GET /BillingDocumentItemPartner/{BillingDocument}/{BillingDocumentItem}/{PartnerFunction}/_Item | Get related _Item |
ItemPartnersApi | billingDocumentItemPartnerGet | GET /BillingDocumentItemPartner | Get entities from BillingDocumentItemPartner |
ItemsApi | billingDocumentBillingDocumentItemGet | GET /BillingDocument/{BillingDocument}/_Item | Get entities from related _Item |
ItemsApi | billingDocumentItemBillingDocumentBillingDocumentItemBillingDocumentGet | GET /BillingDocumentItem/{BillingDocument}/{BillingDocumentItem}/_BillingDocument | Get related _BillingDocument |
ItemsApi | billingDocumentItemBillingDocumentBillingDocumentItemGet | GET /BillingDocumentItem/{BillingDocument}/{BillingDocumentItem} | Get entity from BillingDocumentItem by key |
ItemsApi | billingDocumentItemBillingDocumentBillingDocumentItemItemPartnerGet | GET /BillingDocumentItem/{BillingDocument}/{BillingDocumentItem}/_ItemPartner | Get entities from related _ItemPartner |
ItemsApi | billingDocumentItemBillingDocumentBillingDocumentItemPatch | PATCH /BillingDocumentItem/{BillingDocument}/{BillingDocumentItem} | Update entity in BillingDocumentItem |
ItemsApi | billingDocumentItemGet | GET /BillingDocumentItem | Get entities from BillingDocumentItem |
ItemsApi | billingDocumentItemPartnerBillingDocumentBillingDocumentItemPartnerFunctionItemGet | GET /BillingDocumentItemPartner/{BillingDocument}/{BillingDocumentItem}/{PartnerFunction}/_Item | Get related _Item |
- AbsExchRateAcct
- AbsExchRatePrc
- AbsExchRateStats
- BillingDocumentSAPSelfCreateFromSDDocumentPostRequest
- BillingQtyInSKU
- CashDiscBas
- CollectionOfBillingDocumentItemPartnerType
- CollectionOfBillingDocumentItemType
- CollectionOfBillingDocumentPartnerType
- CollectionOfBillingDocumentType
- ComSapGatewaySrvdA2xApiBillingdocumentV0001BillingDocumentItemPartnerType
- ComSapGatewaySrvdA2xApiBillingdocumentV0001BillingDocumentItemPartnerTypeCreate
- ComSapGatewaySrvdA2xApiBillingdocumentV0001BillingDocumentItemPartnerTypeUpdate
- ComSapGatewaySrvdA2xApiBillingdocumentV0001BillingDocumentItemType
- ComSapGatewaySrvdA2xApiBillingdocumentV0001BillingDocumentItemTypeCreate
- ComSapGatewaySrvdA2xApiBillingdocumentV0001BillingDocumentItemTypeUpdate
- ComSapGatewaySrvdA2xApiBillingdocumentV0001BillingDocumentPartnerType
- ComSapGatewaySrvdA2xApiBillingdocumentV0001BillingDocumentPartnerTypeCreate
- ComSapGatewaySrvdA2xApiBillingdocumentV0001BillingDocumentPartnerTypeUpdate
- ComSapGatewaySrvdA2xApiBillingdocumentV0001BillingDocumentType
- ComSapGatewaySrvdA2xApiBillingdocumentV0001BillingDocumentTypeCreate
- ComSapGatewaySrvdA2xApiBillingdocumentV0001BillingDocumentTypeUpdate
- ComSapGatewaySrvdA2xApiBillingdocumentV0001DBillgDocCrteFrmSDDocCtrlPP
- ComSapGatewaySrvdA2xApiBillingdocumentV0001DBillgDocCrteFrmSDDocCtrlPPCreate
- ComSapGatewaySrvdA2xApiBillingdocumentV0001DBillgDocCrteFrmSDDocCtrlPPUpdate
- ComSapGatewaySrvdA2xApiBillingdocumentV0001DBillgDocCrteFrmSDDocRefPP
- ComSapGatewaySrvdA2xApiBillingdocumentV0001DBillgDocCrteFrmSDDocRefPPCreate
- ComSapGatewaySrvdA2xApiBillingdocumentV0001DBillgDocCrteFrmSDDocRefPPUpdate
- ComSapGatewaySrvdA2xApiBillingdocumentV0001SAPMessage
- ComSapGatewaySrvdA2xApiBillingdocumentV0001SAPMessageCreate
- ComSapGatewaySrvdA2xApiBillingdocumentV0001SAPMessageUpdate
- Cost
- Count
- CreditPrice
- Denominator
- Error
- ErrorError
- ErrorErrorDetailsInner
- GrossValue
- GrossWeight
- InvoicedQuantity
- NetValue
- NetValue1
- NetWeight
- Numerator
- RequiredQuantity
- ScaleQuantity
- Subtotal1
- Subtotal2
- Subtotal3
- Subtotal4
- Subtotal5
- Subtotal6
- TaxAmount
- TotalAmount
- Volume
Authentication schemes defined for the API:
- Type: HTTP basic authentication
To run the tests, use:
composer install
vendor/bin/phpunit
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
1.0.0
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen