T. Code: FBL3N – GL Line Item Display
Output of FBL3N
SAP provides Offset Account Number (GKONT) & Offset Account Type (GKART) fields to be displayed in the output of the report. This can be achieved using the BTE functionality in Financial Accounting.
Use T. Code: FIBF
Or
Menu Path
IMG > Financial Accounting (New) > Financial Accounting Global Settings (New) > Tools > Customer Enhancements > Business Transaction Events
Once the product of a customer is activated you need to create a P/S Module of a customer as shown in the above screen shot using T. Code: FIBF
Create new entries in the P/S module of a customer for BTE Event 00001650 and assign the product activated earlier, using T. Code: FIBF. Also assign the respective function module (LINE_ITEMS_GET_GKONT) and Save.
The following logic is used to populate the values in the required fields of the report.
FUNCTION LINE_ITEMS_GET_GKONT.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_POSTAB) LIKE RFPOS STRUCTURE RFPOS
*" EXPORTING
*" VALUE(E_POSTAB) LIKE RFPOS STRUCTURE RFPOS
*"----------------------------------------------------------------------
E_POSTAB = I_POSTAB. CALL FUNCTION 'GET_GKONT'
EXPORTING
BELNR = I_POSTAB-BELNR
BUKRS = I_POSTAB-BUKRS
BUZEI = I_POSTAB-BUZEI
GJAHR = I_POSTAB-GJAHR
GKNKZ = '3'
IMPORTING
GKONT = E_POSTAB-GKONT
KOART = E_POSTAB-GKART
EXCEPTIONS
BELNR_NOT_FOUND = 1
BUZEI_NOT_FOUND = 2
GKNKZ_NOT_FOUND = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFUNCTION.
Once the BTE is activated, the standard fields GKONT & GKART appear in the Change Layout of the report.
Execute GL Line Item Display report using FBL3N to pull the Offset Account Number (GKONT) and Offset Account Type (GKART) from the change layout.
BTE 1650 with Additional Field To add an additional field in the report, following steps need to be done in ABAP.
In our case we added Offsetting Account Text in the report layout.
Append the RFPOS & RFPOSX structures using T. Code: SE11 as shown in the following screen shots below.
Once the RFPOS & RFPOSX structures are appended, you need to ensure that both the structures are ACTIVE.
Output of FBL3N
SAP provides Offset Account Number (GKONT) & Offset Account Type (GKART) fields to be displayed in the output of the report. This can be achieved using the BTE functionality in Financial Accounting.
Use T. Code: FIBF
Or
Menu Path
IMG > Financial Accounting (New) > Financial Accounting Global Settings (New) > Tools > Customer Enhancements > Business Transaction Events
Once the product of a customer is activated you need to create a P/S Module of a customer as shown in the above screen shot using T. Code: FIBF
Create new entries in the P/S module of a customer for BTE Event 00001650 and assign the product activated earlier, using T. Code: FIBF. Also assign the respective function module (LINE_ITEMS_GET_GKONT) and Save.
The following logic is used to populate the values in the required fields of the report.
FUNCTION LINE_ITEMS_GET_GKONT.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_POSTAB) LIKE RFPOS STRUCTURE RFPOS
*" EXPORTING
*" VALUE(E_POSTAB) LIKE RFPOS STRUCTURE RFPOS
*"----------------------------------------------------------------------
E_POSTAB = I_POSTAB. CALL FUNCTION 'GET_GKONT'
EXPORTING
BELNR = I_POSTAB-BELNR
BUKRS = I_POSTAB-BUKRS
BUZEI = I_POSTAB-BUZEI
GJAHR = I_POSTAB-GJAHR
GKNKZ = '3'
IMPORTING
GKONT = E_POSTAB-GKONT
KOART = E_POSTAB-GKART
EXCEPTIONS
BELNR_NOT_FOUND = 1
BUZEI_NOT_FOUND = 2
GKNKZ_NOT_FOUND = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFUNCTION.
Once the BTE is activated, the standard fields GKONT & GKART appear in the Change Layout of the report.
Execute GL Line Item Display report using FBL3N to pull the Offset Account Number (GKONT) and Offset Account Type (GKART) from the change layout.
BTE 1650 with Additional Field To add an additional field in the report, following steps need to be done in ABAP.
In our case we added Offsetting Account Text in the report layout.
Append the RFPOS & RFPOSX structures using T. Code: SE11 as shown in the following screen shots below.
Once the RFPOS & RFPOSX structures are appended, you need to ensure that both the structures are ACTIVE.
No comments:
Post a Comment