Enhancement in Transaction VF11(Cancel Billing Document) using Enhancement Framework.
Enhancement Framework is a new kind of enhancement technique by SAP. Two types of technique Implicit and Explicit. Enhancement options are like hooks where you can attach the enhancement implementation elements to. In Enhancement option we can add our own business logic, SAP has provided with these standard position where we can add our own business logic and we can implement our functionality without modified original object. And by using Explicit enhancement we can add our own code or enhancement anywhere as per user requirement but we have to create Enhancement spot explicitly enhancement spot can manage several enhancement options of a Repository object. Several enhancement spots can be assigned to one enhancement option.
Here is the example for enhancement in Transaction VF11 which is for Cancel billing document. Before canceling of the billing document user will get pop up message or window with text-field for entering ‘Reason for Rejection while canceling a billing document’. If user will not entered reason in that then system will give error. Once put reason for rejection in that then it will show in transaction VF11 header text with new generated cancel of billing document number in SAP.
We have used explicit enhancement and used Enhancement Point in FM RV_INVOICE_DOCUMENT_ADD. We have created Enhancement spot before calling this function module and added own business logic in that after pressing ‘SAVE’ button and before canceling billing Document. For pop up window we have used FM TRM_POPUP_TEXT_INPUT by using this FM we can get pop up window with text field. We have to enter Reason for Rejection into the text-field of pop up window if not then system will give error ‘Please Enter Reason for Canceling Document’ . Once entered reason then this message will get in Header text of the newly canceled billing document number. We can check it by new canceled billing no. In Transaction VF02. By using FM SAVE_TEXT we can save our message. The function module writes a text module to the memory, depending on the specific text object. By using Enhancement Framework we can add code or our own business logic without modify original code.
Have a question on this topic ? Please read more here.
In case you need assistance on SAP Support Services, please contact us. Please send us your questions, comments or assistance request and our team would be glad to assist you.
By Dipak Khatavkar. (on behalf of SAP Consulting Team)
SAP :: Streamlined
We offer variety of services including SAP ECC ,SAP HR,SAP BW,SAP CRM, SAP SCM,SAP BPM, Business Objects, SAP ABAP Development, SAP BASIS and SAP NetWeaver consulting. We have expertise in providing implementation,development, SAP Migration and SAP support services to SAP customers across diverse industries at a global level.
Have a question on SAP? Write to our SAP Architect : AskTheArchitect@Apprisia.com
(We promise a no-obligation consulting reply)