SAP ABAP IMG Activity ISH_INVOICE_CHECK (BAdI: Check Invoice Creation)
Hierarchy
BBPCRM (Software Component) BBPCRM
   CRM (Application Component) Customer Relationship Management
     CRM_APPLICATION (Package) All CRM Components Without Special Structure Packages
       NPAS (Package) Application development patient accounting system
IMG Activity
ID ISH_INVOICE_CHECK BAdI: Check Invoice Creation  
Transaction Code S_KK4_96000620   IMG Activity: ISH_INVOICE_CHECK 
Created on 20020513    
Customizing Attributes ISH_INVOICE_CHECK   BAdI: Check Invoice Creation 
Customizing Activity ISH_INVOICE_CHECK   BAdI: Check Invoice Creation 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name ISH_INVOICE_CHECK    

Use

This Business Add-In (BAdI) lets you perform plausibility checks for billing before invoices are created and, if necessary, prevent billing.

The method ISH_INVOICE_CHECK provides the tables I_VBRK, I_VBRP, and IT_KONV and the structure I_RNAB0 for the checks. You return the results of the checks to the calling program in the form of messages using the table I_BAPIRET2.

The tables I_VBRK and I_VBRP contain the header data and item data of all the invoices in the started invoice run. Important fields that you can use for the checks start with the prefix ISH. For example, the field I_VBRK-ISHFALNR contains the case number of the case to be billed, with which you can the read, among other things, other case data.

You can evaluate, but not modify the content of the tables I_VBRK, I_VBRP, and IT_KONV and the stucture I_RNAB0.

After the BAdI is called, the calling program evaluates the table I_BAPIRET2, and outputs the messages it contains. If the table contains a message of the type "E", the system does not create any invoices for the invoice run in progress. If the table only contains messages of the types "I", "S" or "W", the system creates the invoices for the invoice run in progress provided no other error messages prevent billing.

The sample code for this enhancement shows how to fill the table I_BAPIRET2.

Note:

Test billing is always possible for control purposes. The relevant messages are generated and output. Live billing is prevented, if necessary.

Requirements

Standard settings

Activities

Example

This BAdI allows you to check whether particular invoice items coexist on an invoice and then prevent the system from creating the invoice.

Another application would be to prevent an invoice from being created when a maximum number of service items is exceeded.

Business Attributes
ASAP Roadmap ID 257   Create User Exits 
Mandatory / Optional 2   Optional activity 
Critical / Non-Critical 2   Non-critical 
Country-Dependency A   Valid for all countries 
Assigned Application Components
Documentation Object Class Documentation Object Name Current line number Application Component Application Component Name
SIMG ISH_INVOICE_CHECK 0 I010004225 Billing 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20020513 
SAP Release Created in 463B