Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
Abinathsiva
Active Contributor
1,366
Introduction:

In this Blog post would like to share one way of the approach to achieve Bank Cash Credit limitation in SAP ECC.

Requirement:

If a industry is having CC account with various Banks, and having Separate GL account of each House Bank, and this requirement is in SAP ECC system. To Tracks the limit utilization / sanction CC Limit.

Proposed Solution:

Though there are multiple ways to approach this requirement, would like to share a solution through FI Substitutions/Validations.

Steps to be followed :

Go-through the General Steps to setup GGB1.

Setting up FI Substitution assigning User Exit

Create a new Step under Substitution as Bank CC limit - Not allowing Negative Value.

Tag U100 Exits for specified prerequisite
BKPF-BUKRS = 'XXXX' AND ( SYST-TCODE = 'F-53' OR
SYST-TCODE = 'F-58' OR SYST-TCODE = 'F110' OR
SYST-TCODE = 'FBCJ' OR SYST-TCODE = 'FB50' OR
SYST-TCODE = 'FB01' )

along with this steps suggested to create a ZTABLE which stores value of given fields list. This can be given t the finance controller of a

| GL ACCOUNT                 |  GL Value Limit   | From Date     |  To DATE    | Main Grp | Sub Grp |



Main Group and Sub Group is created to get consolidated balances of House Banks with grouping logic.

Open program ZRGGBS000 and create a perform with respective FORM name for exit U100.

Tables used to get the Bank account relationship are SKA1, T042IY, T012, T028B Etc,.

and use BAPI_GL_GETGLACCPERIODBALANCES to get the balance of Bank GL.

Sample code attached for reference..
 IF bseg-shkzg EQ 'H'.
IF bseg-hkont IS NOT INITIAL.
bb_hkont = bseg-hkont.
bb1_hkont = bseg-hkont.

CALL FUNCTION 'GET_CURRENT_YEAR'
EXPORTING
bukrs = 'XXXX'
date = bkpf-bldat
IMPORTING
* CURRM =
curry = bb_gjahr
* PREVM =
* PREVY =
.


SHIFT bb1_hkont LEFT DELETING LEADING '0'.
SELECT SINGLE zdesc FROM zfiparam INTO lv_zdesc WHERE zparameter1 = bb1_hkont.
IF sy-subrc EQ 0.
SELECT * FROM zfiparam INTO TABLE it_zfiparam WHERE zdesc EQ lv_zdesc.

IF sy-subrc EQ 0.

SELECT SINGLE zdesc1 FROM zfiparam INTO lv_zdesc1 WHERE zparameter1 = bb1_hkont.
DELETE it_zfiparam WHERE zdesc1 NE lv_zdesc1.


LOOP AT it_zfiparam INTO wa_zfiparam.
* IF open_balold IS INITIAL.
temp = wa_zfiparam-zparameter2.
open_balold = open_balold + temp.
CLEAR temp.
* ENDIF.
ENDLOOP.
ENDIF.
ENDIF.

IF it_zfiparam IS NOT INITIAL.
LOOP AT it_zfiparam INTO wa_zfiparam.

* Use tables like ska1, t042iy, t012, t028b etc., and get link accounts.
* get balances using following FM summ it up inside loop.

CALL FUNCTION 'BAPI_GL_GETGLACCPERIODBALANCES'
EXPORTING
companycode = bkpf-bukrs
glacct = bb_hkont
fiscalyear = bb_gjahr
currencytype = '10'
* IMPORTING
* BALANCE_CARRIED_FORWARD =
* RETURN =
TABLES
account_balances = bb_open_bal.

open_bal = open_bal + open_balcur.

endloop.

IF lvaban = 'X'.
IF ( open_bal + open_balold - bseg-dmbtr ) LT 0.
MESSAGE e398(00) WITH 'BALANCE IN THE ACCOUNT IS NOT AVAILABLE FOR THIS PAYMENT' space.
ENDIF.
ENDIF.

ENDIF.



 

Conclusion :

Through this approach the Cash credit limitation for any number of House banks or linked accounts can be addressed. Please revert in comment for any queries.

 

Regards,

Abinath Sivasankaran
Labels in this area