Professional Documents
Culture Documents
Symptom
You want to include more fields in the actual line item report of the classic Profit Center Accounting (report
RCOPCA02).
Other Terms
The fields must exist in the actual line items table GLPCA.
Solution
1. Call ABAP Dictionary (transaction SE11) and display the table GLPCA. Here, in one row, you can find the
field names and the data element for the field that you want to include.
2. Enhance the reporting structure RPCA2 by adding this field. You can do this either by making a direct
change to the structure (transaction SE11 -> structure RPCA2 -> choose "Change -> Edit/Change-> Insert
Field": Enter the field name and data element. Do not add the new field at the beginning of the structure.
Instead, add it to second half of the structure. -> Save and activate the structure). Alternatively, you can add
an append to the structure.
3. Now go to ABAP Editor (transaction SE38). Enter the program RCOPCA02. The new field must be made
known in the subroutine fieldcat_fill. Add the sample source code lines specified below and adjust them to the
field you require. Note that the position where you insert the rows influences the position of the column in the
report.
Sample source code: Replace SGTXT with the field name of the required field in the process. Supplement
the description of the field in the comment line.
This is a modification.
You can also make the field known in the subroutine fieldcat_fill without a modification by programming an
implicit enhancement option. To do this, go to "Show Implicit Enhancement Options" in the program
RCOPCA02 by choosing "Edit -> Enhancement Options". The implicit enhancement option is displayed at the
end of the subroutine fieldcat_fill.
Information about the line item browser in Profit Center Accounting (transaction KE5ZH)
The line item browsers were created based on an SAP HANA database. The line item browser KE5ZH of
Profit Center Accounting (PCA) reads the data in the table GLPCA. However, you can access additional
fields. This enables you, for example, to output the "Name1" and "Name2" fields of the tables KNA1 and
LFA1.
For important basic information about the line item browsers, see SAP Note 1789045.