You can create custom interpretation algorithm to change system to look for the document to be cleared according the the reference field or the document number.
How does Interpretation algorithm work?
Tries to find in the note to payee information if there is any number in the document number range that you select in the selection screen. Once the system finds all the possible Document Numbers, it tries to find the corresponding FI document by looking for it in table BKPF.
With this document number, it updates table FEBCL with the corresponding clearing information. If it is not possible to find such FI document number, then it updates the table FEBCL to clear the document by amount. Then the system tries to post the document using the clearing information from FEBCL (document number or amount, depending on the above). Only in case, this posting fails, it posts the document on account. But first of all, it tries with the document number or with the amount.
For example in SAP Standard bank reconciliation always refer to KIDNO ( Payment reference ) , to find FI Document No, but in this case we want to find such FI Document No refer to ZUONR ( Assignment No ).
The solution . We can create custom Interpretation algorithm 901 to switch that rule.
Step by Step to Create Custom Interpretation Algorithm and Assign it
1.Go to transaction SE37 and create function module with the name should start Z_FIEB_interpretationnumber_ALGORITHM . for this case the name is Z_FIEB_901_ALGORITHM.
But the easier way you can copy from Interpretation algorithm 21 ( FIEB_021_ALGORITHM ).
2.Write the ABAP code in your custom interpretation algorithm.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
DATA: l_note_to_payee TYPE string,
BEGIN OF kidno_tab OCCURS 10,
nummer LIKE febep-kidno,
END OF kidno_tab,
li_bsis TYPE STANDARD TABLE OF bsis,
lw_bsis TYPE bsis,
lv_zuonr TYPE dzuonr.
FIELD-SYMBOLS : <fs_febep> TYPE febep,
<fs_zuonr> TYPE dzuonr.
l_note_to_payee = i_note_to_payee.
IF NOT l_note_to_payee IS INITIAL.
*reference information is free form, put it into good shape
IF i_country = 'NO'.
CALL FUNCTION 'FIEB_EXTRACT_MINUS_NUMBERS'
EXPORTING
i_note_to_payee = l_note_to_payee
TABLES
e_numbers = kidno_tab.
ELSE.
CALL FUNCTION 'FIEB_EXTRACT_NUMBERS'
EXPORTING
i_note_to_payee = l_note_to_payee
TABLES
e_numbers = kidno_tab.
ENDIF.
ELSE.
ASSIGN ('(RFEBBU10)FEBEP') TO <fs_febep>.
ASSIGN COMPONENT 'ZUONR' OF STRUCTURE <fs_febep> TO <fs_zuonr>.
kidno_tab-nummer = <fs_zuonr>.
APPEND kidno_tab.
ENDIF. "structured or unstructured reference
REFRESH t_avip_out.
LOOP AT kidno_tab.
SELECT * FROM bsis INTO TABLE li_bsis WHERE zuonr = kidno_tab-nummer
AND xopvw = 'X'.
LOOP AT li_bsis INTO lw_bsis.
t_avip_out-koart = 'S'.
t_avip_out-konto = lw_bsis-hkont.
t_avip_out-sfeld = 'ZUONR'.
t_avip_out-swert = lw_bsis-zuonr.
APPEND t_avip_out.
ENDLOOP.
ENDLOOP.
|
Note :
You need to select FI Doc No from BSIS ( Open Item ) table based on ZUONR which you have input during FF67 Transaction.
1
|
SELECT * FROM bsis INTO TABLE li_bsis WHERE zuonr = kidno_tab-nummer AND xopvw = 'X'.
|
Next, you need to passing some information to internal table T_AVIP_OUT with SFELD ( Name of selection field ) = ZUONR and SWERT ( Selection Value ) with value of ZUONR ( Assignment No ) and T_AVIP_OUT-KONTO fill with GL Account from FI Doc (BSIS ) before.
1
2
3
4
5
|
t_avip_out-koart = 'S'.
t_avip_out-konto = lw_bsis-hkont.
t_avip_out-sfeld = 'ZUONR'.
t_avip_out-swert = lw_bsis-zuonr.
APPEND t_avip_out.
|
3.Go to SPRO
4.Assign interpretation algorithm 901 for your transaction type and posting rule the Z_FIEB_901_ALGORITHM will get called automatically.
5.For Electronic Bank Statement, the way almost same as before. but for SPRO you need to open .
6.You can assign the custom interpretation algorithm 901 ( Z_FIEB_901_ALGORITHM ) in this screen.
That how to create custom interpretation algorithm and the way to assign custom interpretation to posting rule and transaction type.
Incoming search terms:
- interpretation algorithm in sap
- SAP Function Module algorithm 019
- sap Z_FIEB_901_ALGORITHM citibank
- sap function module to get GL number assigned to a wagtype
- sap interpretation algorithm
- search algorithm for document numbers
- https://www saptutorial org/create-custom-interpretation-algorithm/
- sap bank statement algorithms 901
- Z_FIEB_ febep-intag _ALGORITHM
- program to create custom interpretation algorithm bank statement sap