984305 - Line item: Definition of special fields (T021S)
You want to define special fields for the line item transactions (FBL1N/FBL3N/FBL5N or as of ERP2004 FAGLL03).
You have basic questions about this function, or encounter problems when you try to save the special fields or start dependent reports.
Other Terms
RFITEMGL, RFITEMAP, RFITEMAR, FAGL_ACCOUNT_ITEMS_GL, FBL1N, FBL3N, FBL5N, FAGLL03, FI_ITEMS, FAGL_ITEMS, T021S, V_T021S, V_FAGL_T021S, special field, BKPF, BSEG, BSEC, BSED, PAYR, BSEGC, RFPOSX, RFPOSXEXT, FAGLPOSE, FAGLPOSYEXT, FAGLPOSX, F4, 308, F4308, layout, ALV, ALV layout, filter, display, change
Reason and Prerequisites
-
Solution
I. Basic information
46C - 470
FBL1N (Vendor line item display)
Financial Accounting
Accounts Receivable and Accounts Payable
Vendor Accounts
Line items
Display Line Items
Define Additional Fields for the Line Item Display
FBL3N (G/L account line item display)
Financial Accounting
General Ledger Accounting
G/L Accounts
Line items
Display Line Items with ALV
Define Special Fields for Finding and Sorting Data
FBL5N (Customer line item display)
Financial Accounting
Accounts Receivable and Accounts Payable
Customer Accounts
Line items
Display Line Items
Define Additional Fields for the Line Item Display
All IMG paths use the table T021S to save the definition of the special fields. Therefore, a special field that is defined for G/L accounts may also be available for customers.
ERP2004 - ERP2005
You can also maintain special fields for FBL1N and FBL5N in these releases using the path mentioned above.
If General Ledger Accounting (new) is active, the path for defining special fields for FBL3N is no longer available, since FAGLL03 is used for displaying G/L account items in the standard system.
However, if you continue to use FBL3N, you can maintain the special fields by following the paths for customers or vendors or by using transaction O7R3.
You can maintain special fields for transaction FAGLL03 in the following path:
Financial Accounting (New)
General Ledger Accounting (New)
Master data
G/L Accounts
Line items
Define Special Fields for Line Item Display
When you save, the special fields are generated in the relevant structure for the line item display:
FBL*N
The basic structure for displaying the items is RFPOSX.
From this entry and the relevant entries in the table T021S, the system generates the structure RFPOSXEXT, which is used for the display. The special fields have the prefix "U_".
FAGLL03
The basic structure for displaying the items is FAGLPOSE.
From the relevant entries in the table T021S, the system generates the FAGLPOSYEXT structure. The special fields have the prefix "U_".
Both structures are included in the structure FAGLPOSX, which is used for the display.
II. Troubleshooting and known problems
When you save or subsequently generate items, you receive an error message, for example "Termination with error 3" or
F4 308 ("System error: Error in routine GENERATE FAGLPOSYEXT").
In this case, analyze the activation log of the relevant structure.
Call transaction SE11 and enter the relevant structure in the "Data type" field:
FBL*N -> RFPOSXEXT
FAGLL03 -> FAGLPOSYEXT
Display the structure.
Then, choose "Utilities -> Activation Log" in the menu.
This log contains exact explanations of which errors occurred.
If errors occur during the generation, also check whether SAP Notes 947573 and 984303 are implemented in your system.
If problems occur when you generate the structure RFPOSXEXT, you can try to regenerate these again using the report RFPOSXEXTEND.
Execute the function module ITEM_STRUC_EXTENSION for special fields for transaction FAGLL03 as described below.
Additional reasons for special problems are listed below.
In addition, start the report BALVBUFDEL when you enhance the special fields. This resets the ALV buffer (SAP Note 205096) and solves display problems.
Fields are defined twice
You use an APPEND to add the special fields to the basic structure (RFPOSX/FAGLPOSE).
When you save the special fields, the fields are included twice in the generated structure.
In this case, remove them from the basic structure or as special fields.
You use fields that contain the character "/"
You try to define a field, for example /TEST/CASE, from the table BSEG as a special field.
This is not possible due to a technical restriction, since fields that contain the character "/" must have the first "/" at the beginning of the field name.
However, since the special fields are always created with the prefix "U_", these fields cannot be used for the special field logic.
However, these fields can be used and filled in the following way:
Add the fields to the structures RFPOSX and RFPOS.
Include or enter the fields in both tables and reactivate the tables.
Start the report RFPOSXEXTEND again to add the fields to the generated structure RFPOSXEXT.
Create the BTE 1650. To do so, copy the sample function module SAMPLE_INTERFACE_00001650 into the customer namespace.
In the customer module, read the fields from the relevant table and transfer the values to the internal fields.
Then activate the module in transaction FIBF.
Choose "Settings -> Products -> ... of a customer" and create a product. Choose any product name and description.
Set the "Active" indicator and save.
Choose "Settings -> P/S Modules -> ... of a customer" and add this entry:
Event: 00001650
Product: Product Name:
Country/Appl.: Blank
Function Module: (your module)
Save the entry.
After these steps, the fields are now also available as special fields. However, the system now reads the special field table for every line. This may have a negative effect on performance.
The field is created correctly, however it is not filled during the first access.
In this case, first start the report BALVBUFDEL. This ensures that the special field is filled during the first access of the list.
In addition, check whether the field is correctly filled in the tables to be read.
You have defined special fields in a development system for transaction FAGLL03. However, after the transport into a test system or productive system, these fields do not exist.
In certain constellations, the routine AFTER-IMPORT for the table T021S for generating the special fields may not be started correctly.
In this case, start the generation manually. To do this, proceed as follows:
Call transaction SE37, enter the function module ITEM_STRUC_EXTENSION and execute it with the following parameters:
BASIC_STRUCNAME FAGLPOSY
EXT_STRUCNAME FAGLPOSYEXT
EXT_FIELDS_TABNAME T021S
I_LSTCL D
X_TRANSPORT ' '
After you have executed the function module, the structure should be regenerated correctly.
III. Other helpful SAP Notes
112312
This SAP Note explains how to make the offsetting account information available.
205096
This SAP Note explains the report BALVBUFDEL.
373268
This SAP Note contains further explanations for the table constellation regarding FBL*N transactions and the creation of the special fields.