Fonction SAP BAPI_FMCABILLDOC_REVERSE - Generate Telco Billing Documents

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
REVERSAL_DOC BAPI_FMCA_EXT_REVERSAL_DOC u 30 External Reversal Billing Document
REVERSED_DOC BAPI_FMCA_EXT_REVERSED_DOC u 84 External Billing Document to be Reversed
TESTRUN BAPI_FMCAINV_FIELDS-TESTRUN C 1 SPACE X Switch to Simulation Mode for Write BAPIs

Paramètre Reférence Type Long. Description
NEW_REVERSALDOC BAPI_FMCA_NEW_REVERSALDOC u 12 Number of Reversal Document for Billing Document

Paramètre Reférence Long. Facultatif Description
EXTENSIONIN BAPIPAREX 990 X Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
EXTENSIONOUT BAPIPAREX 990 X Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
RETURN BAPIRET2 548 X Return Parameter(s)

Functionality
With this Business Application Programming Interface (BAPI) youcan reverse a billing document. This is advisable when billing documentsprocessed by invoicing and posted to Contract Accounts Receivable andPayable cannot be deleted or deactivated.
With reversals, a so-called reversal billing document isgenerated. You recognize a reversal billing document by the fact that itcontains the document number of the reversed billing document in thedocument header in field REVERSEDDOC. Thereversed billing document contains the document number of thecorresponding reversal document in fieldREVERSALDOC.
The reversal of a billing document can take place in two ways
depending on whether the billing document to be reversed has alreadybeen invoiced or not:

  • Reversing a Billing Document that Has Not Been Invoiced:

  • The system creates a reversal billing document that only consists of adocument header. No invoicing order is created for the reversal billingdocument. The invoicing order of the reversed billing document isdeleted.
    As the invoicing orders were deleted, neither the reversed billingdocument nor the reversal billing document are invoiced.
    • Reversing a Billing Document That Has Already Been Billed:

    • The system generates a reversal billing document with line items. Theposting-relevant line items of the reversal document contain the amountsand quatities of the reversed billing document with a minus sign. Aninvoicing order is created for the reversal document.
      When the reversal billing document is invoiced, the amounts andquantities are posted with the opposite sign. This compensates thepostings of billing document already reversed.

      Notes
      Note:

      • The BAPI executes direct updates when successful and does not use the
      • update task.
        • The BAPI executes a COMMIT WORK commando with each call.

        • The BAPI does not perform any user-specific authorization checks.

        • Simulated billing documents cannot be reversed.

        • Reversed billing documents cannot be reversed again.

        • Reversal documents cannot be reversed.

        • Even the reversal billing documents require a unique reference to a
        • document in the feeder system.
          • You can enhance this BAPI by implementing BAdIs ISTINV_BILL_CANCEL (all
          • methods) and FKKINV_BAPIBILL (method CONTRACT_ACCOUNT_DETERMINE) withoutmaking any modifications.

            Description
            Contains characteristics of the newly created reversal document:

            • Component BILLDOCNO contains the number of the reversal document.
            • Description
              This structure defines characteristics of the reversal document:

              • Component REFDOCNO must be filled with the document number of the
              • reversal document in the external system.
                • Component DOCTYPE_EXT is used to determine the document type of the
                • reversal document using posting area 2645. If you leave this componentempty, the document type of the document to be reversed is copied.

                  Description
                  This structure identifies the billing document that should be reversed:

                  • Components LOG_SYSTEM and REFDOCNO must be filled. You identify the
                  • billing document to be reversed from the view of the feeder sytem.
                    • Component CONT_ACCT must be filled with the contract account of the
                    • document to be reversed. Alternatively, you can leave CONT_ACCT emptyand fill CONT_ACCT_ID. In this case, you must implement methodCONTRACT_ACCOUNT_DETERMINE of BAdI FKKINV_BAPIBILL.

                      Description
                      If you select this field, the BAPI does not make any changes in thedatabase but all checks are performed. Any errors that occurred arewritten in export table RETURN.

                      Description
                      You can use this import table to provide the BAPI with additional data.The table is ignored by SAP Standard and is only forwarded to themethods of the BAdI ISTINV_BILL_CANCEL.

                      Description
                      You can use this export table to return additional data from the BAPI tothe caller. It is not used by the SAP Standard. If you want to fill thetable, you must implement the methods of BAdI ISTINV_BILL_CANCEL.

                      Description
                      This table contains all log messages. If a table has one or moremessages of message type E or A, anerror occurred that caused processing to be terminated.