Ansicht
Dokumentation

BADI_GVTR_DERIVE_FLD - Derive Additional Fields for the Balance Carryforward

BADI_GVTR_DERIVE_FLD - Derive Additional Fields for the Balance Carryforward

CPI1466 during Backup   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book

The Business Add-In (BAdI) GVTR_DERIVE_FIELDS is used in the General Ledger (FI-GL) component. You can use this BAdI to derive and populate the fields that aren't calculated by the balance carryforward (BCF) with the SAP standard.

The BAdI is called in the Balance Carry Forward report (FAGLGVTR).

This BAdI includes the following BAdI methods

  • PROVIDE_FIELDNAMES with parameter:
  • iv_pl: import variable that is called for profit and loss (P/L) accounts, if this parameter is set

  • iv_bs: import variable that is called for balance sheet (BS) accounts, if this parameter is set

  • et_fieldname: export table of fieldnames that should be changed.

With the method PROVIDE_FIELDNAMES, you can specify which additional fields should be derived based on the existing fields. You can only specify fields that aren't calculated by the SAP standard for balance carryforward.
The fields that are calculated by the SAP standard are specified in the following Customizing activities:

  • DERIVE_FIELDS with parameters:
  • iv_pl: called for Profit and Loss (P/L) accounts, if this parameter is set

  • iv_bs: called for Balance Sheet (BS) accounts, if this parameter is set

  • cs_acdoca: contains the calculated values and should additionally be populated with the derived values. The structure is a copy of the original data and only the fields, which were specified in the other method, are copied.

With the method DERIVE_FIELDS, you can derive additional fields based on calculated ones (or as constants).

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

When you run this BAdI, a dialog box appears in which you enter a name for the implementation. If any implementations of this BAdI have already been created, the system displays them in this dialog box. You can select a BAdI implementation from this list. Then continue as follows:

  1. In the dialog box, enter a name for the implementation of the BAdI and select Create.
    The system displays the initial screen for creating Business Add-In implementations.
  2. On this screen, enter a short description for your implementation in the Implementation Short Text field.
  3. If you select the Interface tab, you will notice that the system has filled in the Name of the Implementing Class field automatically. The system assigns a class name based on the name of your implementation.
  4. Save your entries and assign the BAdI to a package.
  5. To edit a method, double-click its name.
  6. Enter your implementation code between the method ~ and endmethod statements.
  7. Save and activate your code. Navigate back to the Change Implementation screen.
    Note: You can also create an implementation for a BAdI and activate it later. If you want to do this, do not carry out the following step:
  8. Choose Activate. When the application program is run, the system carries out the code in the method you

You want to populate the field SGTXT with some information for P/L accounts only. For example, you want this field to contain "Account: Account Number". However, the field the field SGTXT isn't marked as BCF relevant.

Therefore, you must specify that you want to change SGTXT in the method add_derived_field_names and calculate it in the method add_derived_field_values. Since you only want this change to apply for P/L accounts, you can use the importing parameter iv_plto restrict this as follows:

PROVIDE_FIELDNAMES

DATA: lv_fieldname TYPE fieldname.


IF iv_pl = abap_true.
lv_fieldname = 'SGTXT'.
APPEND lv_fieldname TO ct_fieldname.
ENDIF.


DERIVE_FIELDS


IF iv_pl = abap_true.
CONCATENATE 'Account: ' cs_acdoca-racct INTO cs_acdoca-sgtxt.
ENDIF.

For more information about implementing BAdIs as part of the Enhancement Concept, see SAP Library for SAP NetWeaver under BAdIs - Embedding in the Enhancement Framework






RFUMSV00 - Advance Return for Tax on Sales/Purchases   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 5460 Date: 20240523 Time: 234359     sap01-206 ( 87 ms )