Wednesday, 6 January 2016

SAP MM Process flow

SAP ABAP resources are often encountered with the questions related to basic process flow of few modules. Being the modules which exist generally in every project, SD and MM tops this list. So here I am summing up the flow of these 2 modules.

Source: http://help.sap.com/

Purchasing Requsition PR (Tcode for creation ME51N. Tables EBAN, EBKN)
A purchase requisition is a request or instruction to Purchasing to procure a certain quantity of a material or a service so that it is available at a certain point in time. 

Source Determination and Request for Quotation RFQ (Tcode for creation ME41. Tables EKKO, EKPO)
With respect to new procurement transactions, you initially wish to fall back on data that is already available in the system. Issuing a one-time purchase order or determining a new source through the more time-consuming process of requesting and processing quotations are functions that will often only take place after you have discovered that there is no suitable source for a certain material or service in the system.

A request for quotation (RFQ) is an invitation extended to a vendor by a purchasing organization to submit a quotation (bid) for the supply of materials or performance of services.

Quotation (Tcode for creation ME47. Tables EKPO, EKKP)
 A quotation is an offer by a vendor to a purchasing organization regarding the supply of materials or performance of services subject to specified conditions.

Vendor Selection and Comparison of Quotation (ME49)
You can compare the prices from all quotations received as a result of a competitive bidding process using the price comparison list. The comparison list ranks the quotations by item from lowest to highest price.

Purchase order PO (Tcode for creation ME21N. Tables EKKO, EKPO) 
Based on all parametrs of a quotation sent by vendors, Vendors are selected from whom the material has to be obtained.  The company  gives  purchase order to the vendor.

Purchase Order Follow ups (Tcode ME91, ME91F, ME92F)

Good's receipt (Tcode for creation MIGO Tables  MSEG)
With the goods receipt (GR) you post the physical inward movement of goods from an external vendor or from production and then complete a goods movement, which leads to an increase in the warehouse stock.

Invoice verification (Tcode for creation MIRO Tables  BSEG) 
In invoice verification incoming invoices are verified in terms of their content, prices and arithmetic. When the invoice is posted, the invoice data is saved in the system. The system updates the data saved in the invoice documents in Materials Management and Financial Accounting.

Goods Issue (Tcode for creation MIGO, Tables MSEG)

Payment -> payment is done based on invoice verification. this is part of FI/CO

In next post will see the process flow of SD module

Happy learning :)

Monday, 7 December 2015

Use of IF_FPM_UI_BUILDING_BLOCK interface in FPM and triggering sequence of its methods

In our earlier post we have create our first FPM OIF application and now we are aware about the terminology of FPM. You must have remembered that while creating the WD component we have re-implemented interface IF_FPM_UI_BUILDING_BLOCK at component level. 
So what is the exact use of this interface? If you remember while creating the component configuration, at one point of time we have given the component name and did F4 and all the windows of that component would come. Where do you think FPM framework gets this information? I mean what is the linkage between FPM application and our WD component. Exactly, you guessed it right. It is this interface. This interface actually brings our standalone WD component within the FPM circle. Of course we have to further give the FPM_OIF_COMPONENT in component field while creating the application.
  
Going further if we look into the interface we can see there are few methods which are present there along with their signature but of course without implementation, because it’s actually the interface and these methods are supposed to be implemented in the WD component where this interface will be re-implemented. Below the methods which are present in this interface.

Because we have implemented this interface in our WD component, if we go in our component and see the methods available at component level, we can find these methods there. Depends on requirement we need to do coding in appropriate method.


FLUSH:  The basic use of this method is for the data transport. This method is the very first method which comes into picture when user does some FPM framework related action. There can be other buttons also, which user has designed in WD component view. If user does some action on those buttons, this will not be considered under FPM framework and methods triggering will take place as explained in one of my earlier post . Instead if user takes some action say suppose in FPM Toolbar buttons, or in case OIF component has been used and user goes to other tab, these actions would be considered in FPM framework and Flush method will get trigger. 

NEEDS_CONFIRMATION: This is used when some sort of user confirmation is required through a pop up box. Depends on the user action, FPM event loop is either continued or cancelled. 

PROCESS_EVENT: This is used whenever we have to implement some after action of one event. We can always check the parameter MV_EVENT_ID to get the actual event name. This parameter we would be getting inside the actual parameter IO_EVENT. Full path is IO_EVENT-> CL_FPM_EVENT->MV_EVENT_ID. By checking what the triggered event is, we can always code what action needs to be taken now.

PROCESS_BEFORE_OUTPUT: This is used just before the final display of screen. Even  for the first time when we run the application, along with the other hook methods, this method also comes into existence.

AFTER_FAILED_EVENT: This method is called whenever any event could not be completed successfully due to any reason. Accordingly parameter IV_REVERT contains the value.
 
Our next target is to see the actual triggering order in which these methods, along with the other hook methods take place. Below are some scenarios. For the convenience we will only consider the hook methods at the component level.
  1.  When application is launched.
             WDDOINIT
             PROCESS_BEFORE_OUTPUT
             WDDOBEFORENAVIGATION
             WDDOPOSTPROCESSING
  2.  On some action which is specific to WD component and does not come under FPM event loop.
             < Action handler method of that button>
              WDDOBEFORENAVIGATION
              WDDOPOSTPROCESSING
  3.  On some action which comes under FPM event loop like Save, Tab change.
              FLUSH
              NEEDS_CONFIRMATION
              PROCESS_EVENT
              PROCESS_BEFORE_OUTPUT
              WDDOBEFORENAVIGATION
              WDDOPOSTPROCESSING
                    
              Happy Learning :)