We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!
The enhancement concept includes the function module EXIT_SAPLE70E_001, which is used to add data to the communication structure MCVV_ESTA. The communication structure MCVU_ESTA serves as an initial interface for the update of the IS-U billing document in the sales statistics. It contains all the statistics-relevant information from the billing document structure, the contract, the installation and the premise. In addition, you can adjust or enhance the structure using Transaction EI03 to suit your requirements.
You can supply alternative data to the standard fields or new fields of the structure by adding additional information in this user exit.
The following information is available for each billing document:
Table XMCVU_ESTA is returned, if necessary with extra data. The function module is called for each billing document.
You have rates in which a franchise fee is calculated. These rates contain a step that valuates a quantity with a price from the franchise contract. The billing line items generated with these rate steps must be processed separately. The quantities and amounts must be accumulated in the Utiltiy Information System in separate key figures. They must not be accumulated in the key figures for total quantity and total amount.
Proceed as follows:
LOOP AT XMCVU_ESTA WHERE NOT FRAN_TYPE IS INITIAL.
XMCVU_ESTA-FRAN_QUANT = XMCVU_ESTA-I_ABRMENGE.
XMCVU_ESTA-FRAN_AMOUNT = XMCVU_ESTA-NETTOBTR.
You want to fill special fields in the communication structure for certain rate steps. You can identify the data from these rate steps only via the name of the variant program. However, the variant program is not available as a field in the communication structure.
For each line from table XMCVU_ESTA you can determine and evaluate the corresponding line items of the invoicing documents using the field BELZEILE. The coding is as follows:
DATA WERCHZ LIKE ERCHZ.
LOOP AT XMCVU_ESTA.
READ TABLE X_BILL-IERCHZ
WITH KEY BELZEILE = XMCVU_ESTA-BELZEILE.
IF WERCHZ-PROGRAMM = ...
You do not wish to transfer the data from the invoicing document to the statistics directly via the standard update. You do not want to calculate a value from the document data until the statistical update takes place.
In this function module you can not only modify existing entries in table XMCVU_ESTA. You can also delete entries or add new entries for which you have calculated the values from the document data.