|Home • Trainings • Quiz • Tips • Tutorials • Functional • Cert Q's • Interview Q's • Jobs • Testimonials • Advertise • Contact Us|
Validating the Document Types in MIRO and MIR7 While Posting the Entry
By Khaja Moulali Shaik, Atos
By using Transaction code MIRO & MIR7 user can
change the document type and post the entry. In order to prevent the user from
using different document types apart from “RE” and “AN” an enhancement
need to be developed to hard stop the transaction.
By this, system should show an error message as below
if the user uses other document types apart from RE and AN.
Document Type “Entered by User (E.g. SA, KZ, and etc)” is not allowed
for this transaction.
Step by step Solution:
Find the enhancement point in the include ‘LFDCBFC0’.
To find the enhancement point, go to Program
Click on the “Enhance
Go to Edità
Enhancement Operations à Show Implicit Enhancement Options.
Now, we will observe commas like below.
Go to Implicit enhancement option at the beginning of
the form ‘CHECK_DOCUMENT_TYPE’ and Right
click à Enhancement Implementation à Create.
Now it will ask for Enhancement Type.
We have to implement the code and it will looks like
Here you can write the custom code for modifying the
DATA : lv_message TYPE string .
IF sy-tcode EQ 'MIRO' or
sy-tcode EQ 'MIR7'.
IF bkpf-blart NE 'RE' AND
bkpf-blart NE 'AN'.
CONCATENATE 'Document "' bkpf-blart '" is not allowed for
this Transaction' INTO lv_message
MESSAGE lv_message TYPE 'E' .
Activate the code and enhancement.
Check in MIRO and MIR7 by selecting the Document Types
other than RE and AN,
it will throw an error message.
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM
©2006-2007 SAPTechnical.COM. All rights reserved.
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG.
Graphic Design by Round the Bend Wizards