SAP for Utilities Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and collaborate on building a sustainable energy future. Join the discussion.
cancel
Showing results for 
Search instead for 
Did you mean: 

Printing interest invoice reversal

Former Member
0 Kudos
270

Hello, everybody

Can anybody tell me any way to print the reversal of an interest invoice in IS-U FI-CA? We have transactions FPI1 / FPINTM1 for generation of that invoice, which includes an option for printing, but for reversal of an interest document there is only FP08 or FP08M, which, as far as I can see, do not have any possibility to print anything. Is there a different transaction for printing such reversals?

Any answer/solution will be highly appreciated.

Thank you in advance,

Bogdan

1 ACCEPTED SOLUTION

Former Member
0 Kudos
161

Hi,

you can create a print request in event 0020 or 0030. You have to do checks to be sure that you are doing an interest document reversing because these events are called in all the FICA documents postings, the print request is something like:

Select customizing for correspondence type ZXXX

  • Pickup customizing

CALL FUNCTION 'FKK_GET_CORR_CUSTOMIZING'

EXPORTING

i_cotyp = c_cotype_ZXXX

IMPORTING

e_tfk070f = l_tfk070f

EXCEPTIONS

not_found = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

  • Fill cluster table structure for the correspondence container - Only need to send information that you cannot put in DFKKCOH or DFKKCOHI

i_zdomcluster-bankn = p_wa_but0bk-bankn.

APPEND i_zdomcluster.

  • get a temporary corr key as the export id

  • that one will be updated in FKK_WRITE_CORR

CALL FUNCTION 'FKK_CREATE_COKEY'

EXPORTING

i_cotyp = c_cotype_ZXXX

IMPORTING

e_cokey = w_cokey.

  • write it with the export command,

  • so that the cluster structure is build by that command.

EXPORT i_zdomcluster FROM i_zdomcluster

TO DATABASE dfkkcodclust(co)

ID w_cokey.

  • Pick it up again, access with relid for index use

SELECT * FROM dfkkcodclust INTO TABLE i_dfkkcodclust

WHERE relid = c_relid_co

AND cokey = w_cokey.

  • Fill C_DFKKCOH structure

l_dfkkcoh-cotyp = c_cotype_ZXXX.

l_dfkkcoh-gpart = p_gpart.

l_dfkkcoh-vkont = p_vkont.

l_dfkkcoh-spras = sy-langu.

l_dfkkcoh-formkey = l_tfk070f-formkey.

l_dfkkcoh-formkey_rdi = l_tfk070f-formkey_rdi.

  • Fill L_FKKCOINFO structure

l_fkkcoinfo-coidt = sy-datum.

  • Call function FKK_WRITE_CORR for the creation of the correspondence

  • container:

CALL FUNCTION 'FKK_WRITE_CORR'

EXPORTING

i_fkkcoinfo = l_fkkcoinfo

i_avoid_sender_det = c_xfeld_x

i_avoid_receiver_det = c_xfeld_init

i_avoid_bukrs_det = c_xfeld_init

i_avoid_language_det = c_xfeld_x

i_avoid_formkey_det = c_xfeld_x

TABLES

t_dfkkcoh = i_dfkkcoh

t_dfkkcodclust = i_dfkkcodclust

CHANGING

c_dfkkcoh = l_dfkkcoh.

  • Check if correspondence container was created:

READ TABLE i_dfkkcoh INTO l_dfkkcoh INDEX 1.

IF sy-subrc NE 0.

  • Error handling - TBD

ENDIF.

Cheers,

View solution in original post

1 REPLY 1

Former Member
0 Kudos
162

Hi,

you can create a print request in event 0020 or 0030. You have to do checks to be sure that you are doing an interest document reversing because these events are called in all the FICA documents postings, the print request is something like:

Select customizing for correspondence type ZXXX

  • Pickup customizing

CALL FUNCTION 'FKK_GET_CORR_CUSTOMIZING'

EXPORTING

i_cotyp = c_cotype_ZXXX

IMPORTING

e_tfk070f = l_tfk070f

EXCEPTIONS

not_found = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

  • Fill cluster table structure for the correspondence container - Only need to send information that you cannot put in DFKKCOH or DFKKCOHI

i_zdomcluster-bankn = p_wa_but0bk-bankn.

APPEND i_zdomcluster.

  • get a temporary corr key as the export id

  • that one will be updated in FKK_WRITE_CORR

CALL FUNCTION 'FKK_CREATE_COKEY'

EXPORTING

i_cotyp = c_cotype_ZXXX

IMPORTING

e_cokey = w_cokey.

  • write it with the export command,

  • so that the cluster structure is build by that command.

EXPORT i_zdomcluster FROM i_zdomcluster

TO DATABASE dfkkcodclust(co)

ID w_cokey.

  • Pick it up again, access with relid for index use

SELECT * FROM dfkkcodclust INTO TABLE i_dfkkcodclust

WHERE relid = c_relid_co

AND cokey = w_cokey.

  • Fill C_DFKKCOH structure

l_dfkkcoh-cotyp = c_cotype_ZXXX.

l_dfkkcoh-gpart = p_gpart.

l_dfkkcoh-vkont = p_vkont.

l_dfkkcoh-spras = sy-langu.

l_dfkkcoh-formkey = l_tfk070f-formkey.

l_dfkkcoh-formkey_rdi = l_tfk070f-formkey_rdi.

  • Fill L_FKKCOINFO structure

l_fkkcoinfo-coidt = sy-datum.

  • Call function FKK_WRITE_CORR for the creation of the correspondence

  • container:

CALL FUNCTION 'FKK_WRITE_CORR'

EXPORTING

i_fkkcoinfo = l_fkkcoinfo

i_avoid_sender_det = c_xfeld_x

i_avoid_receiver_det = c_xfeld_init

i_avoid_bukrs_det = c_xfeld_init

i_avoid_language_det = c_xfeld_x

i_avoid_formkey_det = c_xfeld_x

TABLES

t_dfkkcoh = i_dfkkcoh

t_dfkkcodclust = i_dfkkcodclust

CHANGING

c_dfkkcoh = l_dfkkcoh.

  • Check if correspondence container was created:

READ TABLE i_dfkkcoh INTO l_dfkkcoh INDEX 1.

IF sy-subrc NE 0.

  • Error handling - TBD

ENDIF.

Cheers,