Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Validation in MIRO

Former Member
0 Likes
683

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

ti_ctasreten

where ktopl = w_ktopl

and cta_pasiva = w_hkont

and qsskz = w_ica.

endif.

  • 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'.

endif.

endloop.

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

Validations.

How this validation can be implemented for the MIRO transaction?

Thanks in advance for your collaboration,

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

ti_ctasreten

where ktopl = w_ktopl

and cta_pasiva = w_hkont

and qsskz = w_ica.

endif.

  • 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'.

endif.

endloop.

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

Validations.

How this validation can be implemented for the MIRO transaction?

Thanks in advance for your collaboration,

1 REPLY 1
Read only

Former Member
0 Likes
497

Hi Victor,

This is possible using Substitutions and Validations.

You can check for trsansaction code MIRO in the same and write your exit based on this.

Regards,

Atish