Objective
After completing this lesson, you will be able to illustrate an understanding of the key elements involved in setting up Self-Billing with Invoice Creation
Setting up Self-Billing with Invoice Creation
Self-Billing Configuration includes different configuration apps to support self-billing processing:
Manage Tolerance Groups
Define Sold-to Party Parameters
Define Sender Parameters
Define General Parameters
Customize Self-Billing Processing
Configure Order Reason in SAP S/4HANA
Steps
Log on to the SAP S/4HANA system.
Run transaction SPRO and navigate to SAP Reference IMG → Sales and Distribution → Sales → Sales Documents → Sales Document Header → Define Order Reasons.
Define the following order reasons with the recommended settings as new entries, then save the settings.
If you must define other new order reasons in your SAP S/4HANA system, synchronize them to SAP Self-Billing Cockpit by using the Define General Parameters app.
Define Condition Types
During the self-billing process, SAP Self-Billing Cockpit triggers the creation of an invoice if the buyer requests it. In other cases, the system triggers the creation of a credit memo if the transmitted net value is negative, and triggers the creation of a debit memo if the transmitted net value is positive.
The created documents must contain condition types for identifying the following values:
- Price difference
- Customer tax amount (External tax)
- Customer tax rate (External tax rate)
- Customer-expected value
- Customer-expected price
- Price-related value difference
- Quantity-related value difference
- Total value difference
Define Condition Types
| Condition Type | Description | Control Data 1 | Changes That Can Be Made |
|---|
| Condition Class | Calculation Type | Condition Category | Item Condition | Delete | Amount/Percent |
|---|
| DCED | Price diff. cal. | A | B | - | Yes | Yes | Yes |
| TCE1 | External tax | D | B | D | Yes | - | Yes |
| TCE2 | External tax rate | D | A | D | Yes | Yes | |
| PCE1 | Customer-expected price | B | C | J | Yes | Yes | Yes |
| PCE2 | Customer-expected value | B | B | J | Yes | Yes | Yes |
| DPR1 | Price-related diff. | B | B | - | Yes | Yes | Yes |
| DQU1 | Qty-related diff. | B | B | - | Yes | Yes | Yes |
| DTO1 | Total difference | B | B | L | Yes | Yes | Yes |
Steps
Log on to the SAP S/4HANA system.
Run transaction SPRO and navigate to SAP Reference IMG → Sales and Distribution → Basic Functions → Pricing → Pricing Control → Define Condition Types → Set Condition Types for Pricing. Alternatively, you can run transaction V/06 to navigate to the target window.
Choose New Entries.
Define the following condition types as new entries with the recommended settings, and then save the settings.
Condition Type DCED
Condition Type TCE2
Condition Type TCE1
Condition Type PCE1
Condition Type PCE2
Condition Type DPR1
Condition Type DQU1
Condition Type DTO1
Define CO-PA Value Fields
If you are working with costing-based profitability analysis, it is mandatory to assign the condition types defined for total difference to the corresponding Profitability Analysis (CO-PA) values fields.
Steps
Log on to the SAP S/4HANA system.
Run transaction SPRO and navigate to SAP Reference IMG → Logistics - General → Settlement Management → Basic Settings → Profitability Analysis (COPA) → Assign Value Fields → Maintain Assignment of SD Conditions to CO-PA Value Fields.
Specify the operating concern, which is a unique four-character key for the CO organizational unit.
Choose the cost-based option for the profitability analysis type, and choose to create new entries.
Choose the condition type that you have defined for total difference, such as DTO1, DCED.
Specify the corresponding field name. For example, you can choose KWBRUM if you use the standard fields.
Save your settings.
Enhance Pricing Procedures - Internal Taxes
During the self-billing process, SAP Self-Billing Cockpit creates a clearing line if the transmitted net value doesn't match the simulated net value. During value difference processing, condition types defined in Defining Condition Types influence the pricing procedure.
Steps
Log on to the SAP S/4HANA system.
Run transaction SPRO and navigate to SAP Reference IMG → Sales and Distribution → Basic Functions → Pricing → Pricing Control → Define And Assign Pricing Procedures → Set Pricing Procedures. Alternatively, you can run transaction V/08 to navigate to the target window.
Choose the target pricing procedure (for example, RVAA01), and then use control data under procedures to show details about this pricing procedure.
Define condition types with the following recommended settings, and then save the settings.
Enhance Pricing Procedures - External (Customer) Taxes
Steps
Log on to the SAP S/4HANA system.
Run transaction SPRO and navigate to SAP Reference IMG → Sales and Distribution → Basic Functions → Pricing → Pricing Control → Define And Assign Pricing Procedures → Set Pricing Procedures. Alternatively, you can run transaction V/08 to navigate to the target window.
Choose the target pricing procedure (for example, RVAA01), and then use control data under procedures to show details about this pricing procedure.
Define condition types with the following recommended settings, and then save the settings.
Follow the same steps than previous chapter for Self-Billing with Internal Taxes and do the following:
- Changes regarding Tax Condition Types.
- Change the line for Condition Type, 'Customer Tax Rate' (TCE2), which is placed after Standard Tax Condition Type.
Defining Criteria and Pricing Procedure Determination
Run transaction SPRO and navigate to Sales and Distribution → Basic Functions → Pricing → Pricing Control → Define and Assign Pricing Procedures.
Define Document Pricing Procedure
Here, you define separate Document criteria, 'Self-Billing w/Inv.' (D), to determine different pricing procedure for general SBINV Processing, instead of common Pricing Procedures w/o Condition Types which were needed for Self-Billing with Invoice Creation:
Here, you define separate Customer criteria, 'SelfBill Cust. TxCode' (6), to determine different Pricing Procedure for external (Customer) Tax handling (where standard Tax condition must be statistic).
When Self-Billing with Invoice Creation is intended to be used with Customers' Tax Rates instead of the Internal Taxes, this Customer Pricing Procedure must be set in customer master on sales area level. The pricing procedure is determined for billing documents of such customers accordingly.
For this sales area, just the Customer Pricing Procedure (6) for the external Customer Tax Code determines the pricing procedure with External Taxes (for Billing Documents with Document Procedure D). The others lead to a common Pricing Procedure with Internal Taxes.
Steps
Log on to the SAP S/4HANA system.
Define your condition purpose.
- Run transaction SPRO and navigate to SAP Reference IMG → Sales and Distribution → Basic Functions → Pricing → Condition Purpose in Pricing → Define Condition Purposes.
- Define a condition purpose ID and description.
Assign the condition purpose to the required condition types.
- Run transaction SPRO and navigate to SAP Reference IMG → Sales and Distribution → Basic Functions → Pricing → Condition Purpose in Pricing → Assign Condition Purposes to Condition Types.
- Assign the condition purpose ID that you have defined to the required condition types, for example, you can assign the condition purpose ID to self-billing pricing procedures, A24028 and Y24028, with condition types, DCED, DPR1, DQU1, PCE1, PCE2, TCE1, and TCE2.
With this filtering, new Credit and Debit Memos will not contain these conditions filled with values of the predecessor documents (invoices). Instead, the conditions contain these values, which belong to current transmitted customer data in the new documents, especially for condition types which are used as not statistical in billing documents, the filtering is active, to avoid unintended impact.
Define Billing Types
During the self-billing process, SAP Self-Billing Cockpit triggers the creation of an invoice if the buyer requests it. In other cases, the system triggers the creation of a credit memo if the transmitted net value is negative, and triggers the creation of a debit memo if the transmitted net value is positive.
Defining Billing Types
Billing Type | No. Range Int. Asst | SD Document Category | Transaction Group | Statistics | Rel. for Rebate | Cancel. Billing Type | Copying Requirements | Act Det.G/L Act | Doc. Pricing Proc | Header Partners | Item Partners | Text Determ. Procedure | Text Determ. Proc. Item |
|---|
| ZIXS | 19 | M | 7 | Yes | Yes | S1 | 25 | KOFI00 | D | CI01 | CII1 | T8 | T8 |
| ZIXG | 19 | O | 7 | - | Yes | S2 | 25 | KOFI00 | D | CI01 | CII1 | T8 | T8 |
| ZIXL | 19 | P | 7 | - | Yes | S1 | 25 | KOFI00 | D | CI01 | CII1 | T8 | T8 |
Steps
Log on to the SAP S/4HANA system.
Run transaction SPRO and navigate to SAP Reference IMG → Sales and Distribution → Billing → Billing Documents → Define Billing Types for Sales → Define Billing Types.
Define the following billing types with recommended settings as new entries, then save the settings.
Define Sales Document Item Categories
Item Category
| Field | Value |
|---|
| Item category | LZSN |
| Billing relevance | K |
| Pricing | X |
| Business Item | Yes |
| Schedule lines allowed | Yes |
| Weight/volume relevant | Yes |
| Determine cost | Yes |
| Incompleteness procedure. | 34 |
| Partner determination procedure | N |
| Text determination procedure | T3 |
| Screen sequence group | N |
Steps
Log on to the SAP S/4HANA system.
Run transaction SPRO and navigate to SAP Reference IMG → Sales and Distribution → Sales → Sales Documents → Sales Documents Item → Define Item Categories.
Choose the entry in which the item category is LZN (Sched. Agreement Item) and use the copy-as function to create the item category, LZSN (self-billing w/ Inv.).
Enter the following recommended values and save them.
Define Copying Control for Delivery Documents to Billing Documents
Steps
Log on to the SAP S/4HANA system.
Run transaction SPRO and navigate to SAP Reference IMG → Sales and Distribution → Billing → Billing Documents → Define Billing Types for Sales Define Billing Types.
Define the following billing types with recommended settings as new entries, then save the settings.
Create new Entry Billing for Target Billing Type 'Self-Billing Invoice' (ZIXS) from Delivery Type (LF) as shown in the following image:
Item category
| Field | Value |
|---|
| Item category | LZSN |
| Copying requirements | 430 |
| Billing quantity | B |
| Positive/negative quantity | + |
| Pricing type | C |
Create new Entry for Reference Item Category 'SAIt-SelfBill w/Inv.' (LZSN) as shown here:
- The Billing Quantity (B) is used for delivery-related billing; Pricing Type (C) is used in Order to Copy manual pricing elements and redetermine all others.
- The copy routine 430 (delivery-related items) is delivered in SAP S/4HANA 2022 FPS00. For earlier releases, you can manually create this routine.
- To create routine 430, run transaction VOFM and navigate to Copying requirements → Billing documents. The following is the sample code for creating the routine:
123456789101112131415161718192021222324252627282930313233343536373839404142
*---------------------------------------------------------------------*
* Check reference delivery item in self-billing process *
*---------------------------------------------------------------------*
*---------------------------------------------------------------------*
* FORM BEDINGUNG_PRUEFEN_430 *
*---------------------------------------------------------------------*
* The following work areas are available: *
* *
* LIKP - Reference delivery header *
* LIPS - Reference delivery item *
* VBAK - Reference order header *
* VBAP - Reference order item (only with item reqt) *
* AVBUK - Reference order header status *
* VBUP - Reference del item status (only with item reqt) *
* VBUK - Reference delivery header *
* VBKD - Reference order item bus. data (only with item reqt.) *
* KUAGV - Customer master data for the sold-to *
* KUREV - Customer master data for the bill-to *
* KURGV - Customer master data for the payer *
* KUWEV - Customer master data for the ship-to *
* *
*---------------------------------------------------------------------*
form bedingung_pruefen_430.
sy-subrc = 0.
if analyze_mode is initial.
* This copy requirement is fulfilled if called via self-billing API
data(lo_billing_control) = cl_sd_billing_control=>get_instance( ).
if lo_billing_control->mv_bd_create_process ne lo_billing_control->sc_bd_create_process-v_self_billing.
perform vbfs_hinzufuegen using lips-posnr '331' lips-pstyv
space space.
sy-subrc = 4.
exit.
endif.
perform bedingung_pruefen_004.
endif.
* Transfer of the external fixed value date
vbrk-valdt = xkomfkgn-valdt.
* Fill KIDNO with external payment reference to avoid split on header level
if xkomfkgn-xblnr is not initial.
vbrk-kidno = xkomfkgn-xblnr.
endif.
endform.
During the self-billing process, SAP Self-Billing Cockpit triggers the creation of a billing document (that is, an invoice, a credit memo, or a debit memo) as requested by the buyer.
Credit memos and debit memos are created with reference to an invoice. To support such document creation, copying control must be defined for copying from invoices of a specific billing type to the credit memo or debit memo.
Procedure
Define Copying Control Between Billing Documents
Steps
Open the item dialog from the dialog structure.
Enter the following values as new entries and save them.
Item Category
| Field | Value |
|---|
| Item category | LZSN |
| Copying requirements | 431 |
| Pricing type | C |
Repeat the previous steps to create item category, L2N.
The copy routine 431 (billing-related items) is delivered in SAP S/4HANA 2022 FPS00. For earlier releases, you must manually create this routine.
To create routine 431, run transaction VOFM and navigate to Copying requirements → Billing documents. The following is the sample code for creating the routine:
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
*---------------------------------------------------------------------*
* Check reference billing item in self-billing process *
*---------------------------------------------------------------------*
*---------------------------------------------------------------------*
* FORM BEDINGUNG_PRUEFEN_431 *
*---------------------------------------------------------------------*
* The following work areas are available: *
* *
* LIKP - Reference delivery header *
* LIPS - Reference delivery item *
* VBAK - Reference order header *
* VBAP - Reference order item (only with item reqt) *
* AVBUK - Reference order header status *
* VBUP - Reference del item status (only with item reqt) *
* VBUK - Reference delivery header *
* VBKD - Reference order item bus. data (only with item reqt.) *
* KUAGV - Customer master data for the sold-to *
* KUREV - Customer master data for the bill-to *
* KURGV - Customer master data for the payer *
* KUWEV - Customer master data for the ship-to *
* *
*---------------------------------------------------------------------*
form bedingung_pruefen_431.
sy-subrc = 0.
if analyze_mode is initial.
* This copy requirement is fulfilled if called via self-billing API
data(lo_billing_control) = cl_sd_billing_control=>get_instance( ).
if lo_billing_control->mv_bd_create_process ne lo_billing_control->sc_bd_create_process-v_self_billing.
perform vbfs_hinzufuegen using lips-posnr '331' lips-pstyv
space space.
sy-subrc = 4.
exit.
endif.
perform bedingung_pruefen_027.
endif.
* Transfer of the external fixed value date
vbrk-valdt = xkomfkgn-valdt.
* Fill KIDNO with external payment reference to avoid split on header level
if xkomfkgn-xblnr is not initial.
vbrk-kidno = xkomfkgn-xblnr.
endif.
* Kreditkurs ermitteln
IF vbrk-cmwae NE space.
IF vbrk-cmwae = t001-waers.
vbrk-cmkuf = 1.
ELSE.
CALL FUNCTION 'READ_EXCHANGE_RATE'
EXPORTING
date = vbrk-kurrf_dat
foreign_currency = vbrk-cmwae
local_currency = t001-waers
IMPORTING
exchange_rate = vbrk-cmkuf
EXCEPTIONS
no_rate_found = 1.
IF sy-subrc NE 0.
vbrk-cmkuf = 0.
ENDIF.
ENDIF.
ENDIF.
* Clear Exchange rate setting
clear: vbrk-cpkur.
* Clear status for convergent invoicing
clear: vbrk-buchk, vbrk-gbstk, vbrk-vf_status, vbrk-fkk_docstat.
endform.
Similarly, repeat steps to define copying control for copying data from billing type, ZIXS, to billing type, ZIXG. All settings are the same except for the target billing type.
Define Sales Document Types
Steps
Log on to the SAP S/4HANA system.
Run transaction SPRO and navigate to SAP Reference IMG → Sales and Distribution → Sales → Sales Documents → Sales Document Header → Define Sales Document Types.
Enter the values in the following table as new entries and save them.
Define Copying Control for Sales Documents to Billing Documents
Steps
Log on to the SAP S/4HANA system.
Run transaction SPRO and navigate to SAP Reference IMG → Sales and Distribution → Billing → Billing Documents → Maintain Copying Control for Billing Documents → Define Copying Control for Sales Document to Billing Document.
Enter the following values as new entries and save them.
Open the item dialog from the dialog structure.
Enter the following values as new entries and save them.
The copy routine 432 (order related items) is delivered in SAP S/4HANA 2022 FPS00. For earlier releases, you must manually create this routine.
To create routine 432, run transaction VOFM and navigate to Copying requirements → Billing documents. The following is the sample code for creating the routine:
12345678910111213141516171819202122232425262728293031323334353637383940414243
*---------------------------------------------------------------------*
* Check reference order item in self-billing process *
*---------------------------------------------------------------------*
*---------------------------------------------------------------------*
* FORM BEDINGUNG_PRUEFEN_432 *
*---------------------------------------------------------------------*
* The following work areas are available: *
* *
* VBAK - Reference order header *
* VBAP - Reference order item (only with item reqt) *
* VBUP - Reference order item status (only with item reqt) *
* VBUK - Reference order status (only with item reqt) *
* VBKD - Reference order item bus. data (only with item reqt) *
* KUAGV - Customer master data for the sold-to *
* KUREV - Customer master data for the bill-to *
* KURGV - Customer master data for the payer *
* KUWEV - Customer master data for the ship-to *
* *
*---------------------------------------------------------------------*
form bedingung_pruefen_432.
sy-subrc = 0.
if analyze_mode is initial.
* This copy requirement is fulfilled if called via self-billing API
data(lo_billing_control) = cl_sd_billing_control=>get_instance( ).
if lo_billing_control->mv_bd_create_process ne lo_billing_control->sc_bd_create_process-v_self_billing.
perform vbfs_hinzufuegen using lips-posnr '331' lips-pstyv
space space.
sy-subrc = 4.
exit.
endif.
perform bedingung_pruefen_002.
endif.
* Transfer of the external fixed value date
vbrk-valdt = xkomfkgn-valdt.
* Fill KIDNO with external payment reference to avoid split on header level
if xkomfkgn-xblnr is not initial.
vbrk-kidno = xkomfkgn-xblnr.
endif.
* Clear Exchange rate for FI postings and Exchange rate setting
clear: vbrk-kurrf, vbrk-cpkur.
* Clear status for convergent invoicing
clear: vbrk-buchk, vbrk-gbstk, vbrk-vf_status
endform.
For a scenario that creates a debit memo in a debit memo request.
For a scenario that creates a credit memo in a credit memo request.
Define Copying Control for Billing Documents to Sales Documents
Steps
Log on to the SAP S/4HANA system.
Run transaction SPRO and navigate to SAP Reference IMG → Sales and Distribution → Sales → Sales Documents → Copying Control for Sales Documents → Set Copying Control: Billing Document to Sales Document.
Enter the following values as new entries and save them.
For the fully billed scenario, SAP Self-Billing Cockpit creates a debit memo request reference to the initial billing document. Then, create the new billing document in this debit memo request.
Define Sender Parameters
Steps
Log on to the SAP Fiori launchpad and launch the Define Sender Parameters app.
Sender Parameters
| Field Name | Description | Necessity |
|---|
| Sender | Sender name | Mandatory |
| Sender ID | Sender ID, which the system reads from the received self-billing documents | Mandatory |
| Final duplicate check for transmission | Final date for identifying duplicate transmissions | Optional |
| Repeat yearly for transmission number | Indicator that controls whether to allow the transmission number to repeat yearly in duplicate checks | Optional |
Choose Create, fill the following fields, and save them to create a configuration entry for senders.
Define Sold-to Party Parameters
With this app, you can define parameters for sold-to parties involved in self-billing with automatic posting or in self-billing with invoice creation. These sold-to parties correspond to those that exist in the integrated system.
Key Features
Steps
Log on to the SAP Fiori launchpad and launch the Define Sold-to Party Parameters app.
Sold-to Party Parameters
| Field Name | Description | Necessity |
|---|
| Main reference type of automatic posting | Type of main reference number to be updated in billing documents and journal entries to ease subsequent incoming payment processes. Among various types of reference numbers that can be present in the received self-billing documents (such as the check number, header reference number, and supplier posting number), one is chosen as the main reference type. | Mandatory |
| Tolerance group for automatic posting | Tolerance group defined for the sold-to party mentioned earlier. | Optional |
| Document determination category for automatic posting | Document category used for determining a delivery. You can choose to use the outbound delivery, the external delivery note, or both as the determination category. If both are chosen, the system first tries to determine the delivery based on the outbound delivery number. If it fails, the system tries to determine the delivery based on the external delivery note number. If it fails again, the system reports an error. Note In the context of sales scheduling agreements with consignment, suppliers use the external delivery note number received from senders to determine deliveries. | Mandatory |
Create a configuration entry. Specify the sold-to party by entering the ID of the buyer, and choose to configure automatic posting, invoice creation, or both.
If you chose to configure automatic posting, fill the following fields and save them to create a configuration entry for the sold-to parties.
Manage Tolerance Groups (Optional)
With this app, you can define tolerance groups to specify tolerance limits for self-billing processing. Specifically, you can use the tolerance limit to define the maximum tolerated difference between the transmitted net value and the referenced net value. If the difference exceeds the tolerance limit, an open item or open line is created. Defined tolerance groups can be assigned to sold-to parties in the Define Sold-to Party Parameters app.
Key Features
Steps
Log on to the SAP Fiori launchpad and launch the Manage Tolerance Groups app.
Choose Create, specify the following parameters, and save them to create a tolerance group.
Parameters
| Field Name | Description | Necessity |
|---|
| Tolerance group | ID of the new tolerance group | Mandatory |
| Description | Tolerance group description | Optional |
| Sales organization | Sales organization responsible for the sale of products to the buyer | Mandatory |
(Optional): Choose Edit, navigate to the tab page for defining percentage limits, define the settings for the tolerance limits, and save them.
(Optional): On the tab page for defining absolute limits, define new settings and save them. You can define absolute limits in multiple currencies.
Set the check limit separately for each tolerance limit. If you select it for a given tolerance limit, the system checks the difference against this tolerance limit. If you don't select it for a tolerance limit, any difference that occurs is considered within this tolerance limit.
If the transmitted net value is lower than the referenced net value, the system checks the difference against the lower limit. Otherwise, the system checks the difference against the upper limit.
The system checks against the following tolerance limits (if defined and selected) in sequence and stops the tolerance check if any of the following tolerance limits is exceeded: percentage limit per document, absolute limit per document, percentage limit per item, and absolute limit per item.