!--a11y-->
User Exit for Intercompany Lines in SAP FI Documents 
Use
When you post an SAP FI document in an SAP Joint Venture Accounting (JVA) company, the SAP JVA integration manager creates the corresponding SAP JVA document. The SAP JVA integration manager determines the joint venture information needed to formulate the SAP JVA document. It derives the joint venture, the equity group, and the recovery indicator (RI) for each line in the SAP FI document.
In addition, the integration manager determines whether or not each SAP FI line should be the basis for splitting the other lines in the SAP JVA version document, or whether the SAP FI line should itself be split in the SAP JVA document. The integration manager handles splitting differently, depending on whether the line belongs to a clearing or a non-clearing document, and depending on what joint venture information is available for the line.
SAP JVA Handling with User Exit
The enhancement JVA-IM-1 with function module exit EXIT_SAPLGJVI_001 for intercompany lines enables you to handle intercompany lines differently, than the standard handling, when assigning recovery indicators (RIs) and determining splitting. This exit is only called when SAP JVA is active for the SAP FI company. If an SAP FI document contains intercompany lines, SAP JVA calls this exit to determine the handling of those lines. The user exit can determine the following, when formulating the SAP JVA line for an SAP FI intercompany line:
To enable the SAP JVA integration manager to determine these two issues, the user exit uses information on the intercompany lines taken from a table (Refer to Table 1). An ABAP program can provide the necessary RI and splitting information for intercompany lines.
User Exit Table
To determine handling for intercompany lines, the user exit refers to a table with document information. This table contains one line for each company in the intercompany document, as shown in the following example:
Table 1
|
Field |
Contents |
|
AWTYP |
Type of the document (usually RFBU) |
|
AWREF |
Reference document number (This field will be empty) |
|
AWORG |
Reference organizational unit (This field will be empty) |
|
BUKRS |
Company code |
|
BELNR |
Preliminary document number |
|
GJAHR |
Fiscal year |
|
APPL |
Application (SAP FI, SAP CO, SAP MM, SAP SD) |
|
CLEAR |
Flag the document if it is a clearing document |
|
CLEAR_LN |
Number of clearing lines for this company (A clearing document usually has clearing lines only in a single company. |
|
VENDOR |
Number of vendor lines for the company |
|
CUSTOM |
Number of customer lines for the company |
|
GLACCT |
Number of general ledger account lines for the company |
|
EXCHGE |
Number of exchange difference lines for the company |
|
TAX |
Number of tax lines for the company |
|
ASSET |
Number of asset lines for the company |
|
DISCNT |
Number of discount lines for the company |
|
INTCOM |
Number of intercompany lines for the company (This should always be 1 – If it is greater than 1, the user exit is not called) |
|
SPLIT |
Value set to one of the following by the user-created program: BLANK Standard handling of split determination.
|
|
RECID |
Value for RI supplied by the user exit program |
SAP JVA Integration Manager Handling of User Exit Table Entries
The RI entered in the table field RECID by the user exit program is set on the intercompany line for the company in the document.
When splitting the intercompany line, the integration manager checks the split flag in the table, which should be set by the user exit program. If there is no value in the SPLIT field, the SAP JVA integration manager applies default splitting to the intercompany line.
If the value in the SPLIT field is 1, no splitting takes place. If joint venture information is available on the intercompany line, then the line is the basis for splitting other lines in the SAP JVA document. If no joint venture information is provided on the intercompany line, the corporate joint venture information for the company is assigned to the line.
If the value in the SPLIT field is 2, the document is a clearing document, and open items for the company are selected. The intercompany line is split, according to the joint venture information on the open items. If there are no open items for the company, the value in the SPLIT field is changed to 1 and no split takes place, because there is no basis available.
Creating the User Exit Program
The first step in creating a user exit program for handling intercompany lines in SAP JVA documents is to create a user project and copy the delivered SAP JVA objects into the project.
Menu Path
On the SAP Easy Access menu, choose Tools
® ABAP Workbench ® Utilities ® Enhancements ® Project management.The Project Management of SAP Enhancements screen appears.
You must create an ABAP program to fill the RECID and SPLIT fields of the SAP JVA intercompany user exit table.
