Enhancing SAP standard transactions FBL3N/FBL1N/FBL5N with extra fields in the output list via BTE
This blog talks about how to add some extra fields like Vendor Number, Customer Number, separate fields for credit & debit indicators and opening balance , closing balance per posting date wise in the output screen of SAP standard transactions FBL3N/FBL1N/FBL5N.
Solution: We can use openFI 1650 (BTE) to add any fields to ALV output list in FBL3N/FBL1N/FBL5N at the same time.
SAP has already provided the place for Open FI BTE (1650) in the standard program that will trigger the custom function module assigned to the event 1650 in FIBF T-code.
FBL3N: G/L Account Line Item Display
FBL1N: Vendor Line Item Display
FBL5N: Customer Line Item Display
Step 1: Create all required fields using append structure in structures RFPOS, RFPOSX
Step 2: Create a custom function module by copying the same interface parameters of FM SAMPLE_INTERFACE_00001650.
Step 3: Write the logic to populate the extra fields inside this custom function module as per your requirement.
FUNCTION zfi_fm_fbl3n.
*”———————————————————————-
*”*”Local Interface:
*” IMPORTING
*” VALUE(I_POSTAB) LIKE RFPOS STRUCTURE RFPOS
*” EXPORTING
*” VALUE(E_POSTAB) LIKE RFPOS STRUCTURE RFPOS
*”———————————————————————-
*& Function Module Name : ZFI_FM_FBL3N
*& Module : FI
*& Functional Consultant :
*& Author Name : Manoj Kumar Pradhan
*& Date Of Creation : 24/07/2012
*& Description : This fm populates values for additional fields
* like vendor,customer, separate fields for debit & credit
* indicator which will be displayed in FBL3N/FBL1N/FBL5N
* output list.
*
* It triggers from T-codes FBL3N/FBL1N/FBL5N
* for BTE event 00001650 & configured
* in FIBF T-code for customer products Z1650 for the event 00001650.
*& Transport Request :
*& Tcode : NA
**********************************************
***** Data Declaration***************
**********************************************
DATA : e_fiscal_yr TYPE bapi0002_4-fiscal_year,
e_period TYPE bapi0002_4-fiscal_period,
e_prev_period TYPE bapi0002_4-fiscal_period,
e_ret TYPE bapireturn1,
e_first_day_of_period TYPE bapi0002_4-posting_date,
lf_prev_day_of_post_date TYPE budat,
e_ret2 TYPE bapireturn1,
e_ret3 TYPE bapireturn,
e_ret4 TYPE bapireturn,
lf_sum_dmbtr TYPE dmbtr,
lf_sum_dmbtr_k TYPE dmbtr,
lf_sum_dmbtr_d TYPE dmbtr.
e_postab = i_postab.
SELECT SINGLE lifnr kunnr
FROM bseg
INTO (e_postab-zzlifnr, e_postab-zzkunnr)
WHERE bukrs = i_postab-bukrs
AND gjahr = i_postab-gjahr
AND belnr = i_postab-belnr
AND ( kunnr <> ” OR lifnr <> ” ).
IF i_postab-shkzg = ‘S’.
e_postab-zzdeb_ind = ‘S’.
ELSEIF i_postab-shkzg = ‘H’.
e_postab-zzcr_ind = ‘H’.
ENDIF.
*********************************************
Step 4: Activate Open FI: t-CODE – FIBF & Create product of a customer by inputting product name, text & activate the same.
Step 5: Create P/S MODULES of a customer in FIBF and assign custom function module to event 1650 & product.
Step 6: Finally run standard program RFPOSXEXTEND to regenerate structure & run program BALVBUFDEL to clear ALV.
Note: These two programs can only be run by user who has admin authority. Contact Basis user or IT administrator for assistance
After the completion of the above steps, we will be able to view these extra fields on execution of T-codes FBL3N/FBL1N/FBL5N.
New NetWeaver Information at SAP.com
Very Helpfull