SAP ABAP IMG Activity SIMG_CMMENUNMO3SPEZ0 (Explain Basics of Invoice Output with SAPscript)
Hierarchy
BBPCRM (Software Component) BBPCRM
   CRM (Application Component) Customer Relationship Management
     CRM_APPLICATION (Package) All CRM Components Without Special Structure Packages
       NBAS (Package) Appl. development Hospital System master data, catalogs
IMG Activity
ID SIMG_CMMENUNMO3SPEZ0 Explain Basics of Invoice Output with SAPscript  
Transaction Code S_KK4_74000447   IMG Activity: SIMG_CMMENUNMO3SPEZ0 
Created on 19990816    
Customizing Attributes SIMG_CMMENUNMO3SPEZ0   Explain Basics of Invoice Output with SAPscript 
Customizing Activity    
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name SIMG_CMMENUNMO3SPEZ0    

Invoice Output with Forms (SAPscript)

Invoices can basically be printed using SAPscript form output in two situations:

  • Directly after invoice creation (in test or production billing mode)
  • Using a print program

You can also trigger form output from the invoice overview, or from the SD transaction Display/Change Billing Document.

Overview of Customizing Activities

The IMG activities pertaining to general printout are described in detail in the section entitled Work Organizer Management.

The present IMG activity provides detailed information only on settings and features that are specific to Patient Accounting.

The following work organizers are used:

  • RECH_01A (inpatient single billing, billing type-controlled)
  • RECH_01 (inpatient single billing)
  • RECH_02 (invoice list for insurance provider)
  • RECH_10A (outpatient single billing, billing type-controlled)
  • RECH_10 (outpatient single billing).

By default, the system calls the same function module (ISH_PRINT_RECH00) to accommodate form formatting.

The corresponding events are

  • FAKT01 (inpatient single billing)
  • FAKT02 (outpatient single billing)
  • FAKT10 (invoice list)

For day patient individual billing, you can use an institution-specific, time-independent parameter to control which work organizer is to be used.

The output of single invoices is conditioned by

  • Insurance provider and insurance provider type or
  • Billing type and insurance provider type.

The output of invoice lists is not subject to any conditions.

The Customizing activity Form Windows is not supported for invoice printout, so that your own SAPscript forms should use the windows and elements of the example forms contained in the standard system.

Technical Information for Creating Your Own Print Modules

Whenever the system outputs an invoice on a form, it first calls function module ISH_PRINT_RECH0. This call is hard coded.

Invoice headers (table VBRK), invoice items (table VBRP) and conditions (table KOMV) are passed to this module as internal tables (IVBRK, IVBRP, IKOMV).

  • For each single invoice (LOOP AT IVBRK), function module ISH_PRINT_RECH00 is called in this module to assume further data retrieval, the single invoice print and preparations for the invoice list (creation of internal tables IRNF26 and IRNFP2).
  • By making an entry in the Customer FM field in work organizer control with insurance provider and insurance provider type or work organizer control with billing type and insurance provider type, you can replace ISH_PRINT_RECH00 by your own function module.

If you make an entry in the Print Prog. field, the system calls this customer-specific print module which provides data to the SAPscript output (call and interface in the ISH_PRINT_RECH00 function module).

  • The printout of the invoice list (collective invoice) is initiated in function module ISH_PRINT_RECH02. A list with item structure RNFP2 is output for each insurance provider (LOOP AT IRNF26).
  • Again you can implement your own list output by making an entry in the Print prog. field. (Call and interface in the ISH_PRINT_RECH02 function module). By means of an Include you can append further fields to item structure RNFP2 and output the corresponding data in the list.

By setting the appropriate indicator in the invoice print program, you can specify that a detailed invoice list should be output (for more information, refer to documentation on this indicator).

Important: for work organizers with conditions (i.e. RECH_01A, RECH_01, RECH_10A and RECH_10) all modules that retrieve data and output single invoices must be located in a common module pool. This is because to be able to call the SAPscript module OPEN_FORM, the system requires the module pool specification; in ISH_PRINT_RECH02, this call is made centrally and not for each invoice.

This does not affect the output of the invoice list, since a further OPEN_FORM call is carried out beforehand.

Outputting Special Invoice Information

  • Terms of payment: the fields RNG12-ZTERM and ZRNG12-VTEXT contain the terms of payment specified in the customer master record along with a sales and distribution short text. You need to have maintained this short text in Customizing for Logistics.
  • Transfer slip: if a transfer slip is to be output in addition to the single invoice, you need to have made an entry in the U-Def.Txt field on the detail screen of the control tables Work organizer control by billing/IP type or Work organizer control by insurance provider/IP type (technical name: V_TNF32 and V_TNF31). This entry is the prerequisite to the UEBERWEI window being called. If you do not use this window, you can also output the data intended for the payment slip (structure RNF22) in another window which is not a MAIN window.
    Note that this particular construction assumes that the invoice and payment slip are both output on one specially designed form template. If, for example, the invoice is to comprise a number of pages, structure RNF22 (in particular the amount to be transferred) is correctly filled for the last page only. The reasons for this are technical, and unfortunately cannot be avoided.
    If your invoices could comprise several pages, it is preferable to create the payment slip as a separate form with the windows MAIN and UEBERWEI. Here MAIN can be left empty and the RNF22 fields can be output in the UEBERWEI window. The additional output of a further form is explained below.
  • Note that it is not practical to use the structure RNF17 or RNF17L when several treatment diagnoses exist for the case, since only a randomly selected treatment diagnosis is used here. This applies in particular to outpatient cases where it is not possible to classify diagnoses.

Outputting Special Invoice Information Using User Exit Function Modules

For defined invoice printout events, you can copy standard function modules of the SAP System and then modify your copy. These function modules provide the user with a defined output structure which can be filled to satisfy his or her requirements (user exits). This technique makes it possible to tailor forms in a way not possible with the standard functions.

Some of these function modules allow you simply to activate existing source code (change comment lines into statements). For others, you have to write the source code to fill the output structure.

The new output structures must now be made available to the invoice form.

To activate a user exit function module, proceed as follows:

  1. Check the function modules made available by SAP and determine the function module you require using the long text display and the output structure of the function module. In general, the documentation on the function module contains further information on its use or the implementation of customer-specific function modules.
  2. Create a customer-specific function module by copying the required standard module and enter the new function module name for the corresponding event. This name should be within the customer range. Use a customer-specific function group (within the customer range) for your function module. Make sure that you copy the global data of the TOP Include as well.
  3. Check whether the function module you have selected fills all the required fields of the output structure. In some cases, you can activate existing source code; in others, you have to write the source code yourself. On no account should you modify the interface of the function module.
  4. Now redesign the respective invoice form using transaction SE71. You specify the fields of the output structure of the user exit function module in the appropriate places. If you have copied an existing form for this, do not forget to assign the new name to the corresponding technical work organizer in form control. You also have to re-activate the modified form.

The output fields of the user exit can supply data to different parts of the invoice form.

  • Invoice header level:

    Additional data can be read here or placed and output in predefined fields.

  • Invoice item level:

    Additional data such as texts can be output for the items. The invoice items can be sorted according to a number of criteria or items can be combined.

  • Condition output:

    These can be output either per item and/or combined at the end of the invoice.

  • The invoice list for the insurance provider can be tailored to individual requirements.

Examples

  1. An attachment listing non-billed services is to be sent with every invoice of insurance provider type MEDISAVE.
    1. Create work organizer RECH_99 (invoice attachment) to supplement work organizer RECH_01 &
Business Attributes
ASAP Roadmap ID 207   Establish Reporting 
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 SIMG_CMMENUNMO3SPEZ0 0 I010004204 Patient Accounting 
Maintenance Objects
Maintenance object type    
History
Last changed by/on SAP  19990816 
SAP Release Created in