Skip to Content
Former Member
May 16, 2007 at 05:58 PM

Validation in MIRO


The FB60 transaction has a substitucion assigned, which verifies accounts

to prevent that not allowed accounting operations can be registered.

This verification is executed using this code

  • Search for the valid accounts for the ICA indicator

if w_ica ne space.

select * from zctas_reten appending table


where ktopl = w_ktopl

and cta_pasiva = w_hkont

and qsskz = w_ica.


  • Verifies that the expenses account are the allowed

loop at bool_data-bseg into bseg

where hkont(1) = '5'

or hkont(1) = '6'.

read table ti_ctasreten

with key cta_activa = bseg-hkont.

if sy-subrc ne 0.

message e802(fi) with 'Cta de gasto invalida' bseg-hkont

'para Retenciones de Renta ó ICA'.



If the search within the table TI_CTASRETEN did not succed, it is not

possible to register the accounting movement and an error message is

generated, this works for the FB60 transaction.

The problem we have is described below:

When the MIRO transaction (MM module) is executed, a bill document is

generated (MM) also an accountant document (FI). We require that at the

moment of the accountant document generation, the system executes the same

validation that the FB60 transaction executes (explianed above). This

can't be realized using the substitution function (as used for the FB60

transaction), because de MM module does not allow Substitutions or


How this validation can be implemented for the MIRO transaction?

Thanks in advance for your collaboration,