Ansicht
Dokumentation

CRM4S_PS_BILL_CREATE - BAdI: Data Change Before Creating Billing Documents

CRM4S_PS_BILL_CREATE - BAdI: Data Change Before Creating Billing Documents

BAL_S_LOG - Application Log: Log header data   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

This Business Add-In (BAdI) is used in the Social Services component. You can use this BAdI to change data before creating billing documents for net calculation documents using the Social Services Billing Mass Run.

This BAdI is called after net calculation documents (NCD) are read and before billing documents are created. It is called for regular billing documents, but not for reversal documents. The BAdI is called separately for each billing document.

Because not all necessary data is available in a net calculation document, this BAdI must be implemented to supplement the missing data. The following fields must be added to a billing document:

  • Header level:
  • External document type for billing documents

  • Item level:
  • Company code

  • Transaction

  • Subtransaction

Additionally, the BAdI can be used to change the data of the billing document to be created. It is possible to do each of the following:

  • Cancel the creation of a billing document for a net calculation document. In this case, the net calculation document's status is not changed, and the net calculation document is considered again in the next call of the billing mass run program.
  • Change attribute values (header and item of the billing document).
Note: It is not possible to remove the link between a net calculation document and a billing document.
  • Add or delete items.
  • Return messages, which are displayed in the application log.

Interface Parameters

Parameter Description
IV_SIMULATION_RUN Indicates that the current run is only for simulation purposes (see Simulation Run parameter on selection screen).
IS_NCD_HDR and IT_NCD_ITM Including the NCD data for which the billing document is being created.
CS_BILLDOC Billing data assembled by SAP standard. You can change data at header and item level and return it to the calling program.
EV_SEVERE_ERROR Set this parameter to 'X' to undo billingdocument creation. Alternatively you can clear CS_BILLDOC.

Note:
Please note the following limitation for the parameter IS_NCD_HDRin the NCD header: do not rely on field EXTRAORDINARY_NC to distinguish between under- or overpayments and regular payments, since an NCD can contain more than one payment category. Instead, use the process category at item level, as is the case in the sample implementation of class CL_CRMS4_PS_BILL_CREATE.

You can return arbitrary messages in table ET_LOG_TAB; they are handed over to the application log but do not influence the program sequence in the calling program. Example: When an error message is returned, this does not mean that the calling program is aborted.

As the SAP standard NCD does not include all the necessary data, this BAdI must be implemented to supplement the missing data. For example, the following fields must be filled by a BAdI implementation:

* header External document type for billing documents CS_BILLDOC-EXTBILLDOC-HEADER-DOCTYPE_BILL_EXT
* item Company code CS_BILLDOC-EXTBILLDOC-ITEM_TAB[<i>]-BUKRS
* item Transaction CS_BILLDOC-EXTBILLDOC-ITEM_TAB[<i>]-HVORG
* item Subtransaction CS_BILLDOC-EXTBILLDOC-ITEM_TAB[<i>]-TVORG

You must not change the link between an NCD and a billing document; for example, you must not change field CS_BILLDOC-EXTBILLDOC-HEADER-DOC_REF_UUID. If this field is changed by an implementation, the system does not create a billing document (forthis NCD) (the same applies if you set EV_SEVERE_ERROR to 'X').,,

Subtransaction Subtransaction

For more information about the standard settings (filters, single or multiple uses), see the Enh. Spot Element Definitions tab in the BAdI Builder (transaction SE18).

Subtransaction

For information about the implementation of BAdIs in the context of the Enhancement Concept, see SAP Library for SAP NetWeaver under BAdIs - Embedding in the Enhancement Framework.

Subtransaction

Subtransaction

Subtransaction

Subtransaction

Subtransaction






CL_GUI_FRONTEND_SERVICES - Frontend Services   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.

Length: 7547 Date: 20240523 Time: 155142     sap01-206 ( 168 ms )