SAP Program RFKKINV_SAMPLE_CREATE_BILLDOC - Generate Billing Documents

Purpose
This report is a sample solution and is designed to be used as a copyingtemplate for a customer solution. The report terminates processingbefore billing documents are generated.
Important:
A report which generates billing documents for test purposes, shouldnot be executed in a production system under any circumstances, since itgenerates posting-relevant documents for Contract Accounts Receivableand Payable.
Billing documents are generated by transferring data from externalsystems. See the Enterprise ServiceContractAccountInvoiceRequestERPBulkCreateRequestConfirmation_In.Billing documents are processed by invoicing in Contract AccountsReceivable and Payable and posted in FI-CA.
In the following situation it can be useful to generate billingdocuments using a customer report:

  • You want to test invoicing in Contract Accounts Receivable and Payable
  • in a test system.
    • Transferring external data using the BAPI referred to above has not been
    • implemented for the test system.
      You can use this report as a template for your own solution. Copy thereport and remove the coding section, which triggers processingtermination. Adjust the report so that it meets your requirements. Thereport uses class CL_FKKINV_SAMPLE_EXTERN_BILL to simulate external dataand generate test billing documents from this using theFKKINV_BILLDOC_CREATE function module. You can add the "external" datato the CL_FKKINV_SAMPLE_EXTERN_BILL class if necessary. You can also usethis non-final class to hand down to a subclass of your own.

      Integration

      Prerequisites
      The report can only simulate external data if the posting areas aremaintained for the transfer of billingdocuments.
      Entries must be available in posting areas 2640, 2641, 2642, and 2643for the logical system, which you entered as aparameter when you executed the report.
      Entries for the posting area, which you entered as a parameter when youexecuted the report, must be available for posting area 2640.

      Selection
      Contract account: You can generate billing documents for one or morebilling documents.
      Company code: The system only processes contract accounts whosecompany code group is compatible with the companycode proposed here.
      Number of posting-relevant items: Defines the number of posting-relevantitems that are generated for each billing document.
      Number of information items: Defines the number of non posting-relevantitems that are generated for each billing document.
      Enhance simulated items: Leads to items being included in the billingdocument for which the Document Item isSimulated indicator is selected.
      Additional items: Means that additional items are generated for eachbilling document (table FKKINVBILL_A).