Showing posts with label SAP ERP. Show all posts
Showing posts with label SAP ERP. Show all posts

Tuesday, 15 March 2016

Logging of table data changes

SAP provides mechanism to log the changes in any object. For some objects we CDHDR and CDPOS table. In the same way, if one wants to log the changes done in table data like when data was created, when changed and when deleted, SAP has a mechanism for this also. For this we will be taking help of table DBTABLOG and a t-code SCU3.

Now what we need to do when creating the table? I'll create a demo table and log it's data change. So in the process, I am creating a table named ZTEST_LOG. 
 Now while doing the technical settings, we have to check the option for table logging.
 Now we have to create table maintenance generator for this table. While creating table maintenance generator, authorization object S_TABU_DIS comes by-default. Now one thing to remember here. Without creating table maintenance generator also we can create the entries in table. We will b able to see them in table DBTABLOG. But t-code SCU3 won't show us anything and it will give us error for assigning the table in right authorization group. The reason for this error is that table maintenance generator is missing. So always maintain table maintenance generator.


Now we will be first seeing the table content of DBTABLOG, so that we can differentiate later on.

 
We will create 3 entries in table. 

and then we will again check the DBTABLOG table.

 First entry shows the start of change and so the last entry for the end of change. In between there are 3 entries, each for 3 rows we have created. We can click on an entry and can look inside for other fields also.
 Logkey field is the concatenation of the client where data is created and the primary key field's value. It stores the date, time and the user who have done the changes.

Now we will go into T-code SCU3 and will see how it looks. Go into SCU3 and click on "Evaluation of change log". Below screen will come and give the table name and appropriate date and time. Choose Table option in "Evaluation for" box.
 
Now we will go and change one existing entry in table. So table content now looks like below.


Check what table DBTABLOG now has in it.

Again you can see one entry marks for begging of changes and one for end of changes. And one entry in between for the actual data change. If we go inside, again it shows us in which particular row we have done the changes with the field LOGKEY.


Check in t-code SCU3 also. This time it shows the key field of the row which has been changed and also which field particularly has been changed from which value to which value.


So this way you can completely track the table data changes. Table DBTABLOG tells you about the data change done when, by whom and in which client. While as T-code SCU3 tell you exactly what has been changed. What was the old value and what was the new value.

Happy Learning :)

Friday, 12 February 2016

Basics of ABAP Webdynpro: Getting familiar with Webdynpro jargons part 3

Internal/Context mapping: We can define context node at any of the available controller. However as WD component controller works as a global one, context node defined there is accessible in any other controller. We just have to drag and drop those WD component controller context node to the controller we want them to be used. In that case, if we define any value to this node at WD component level, this value will flow to the other controller where it has been used. And also if we make any changes in that context node in controller where it is mapped, that value will flow to WD component level also.

External/Cross component context mapping: In one of the earlier posts we have seen what component usage is all about. Suppose we are using WDC1 into WDC2 through component usage. Now context mapping between a context node, which is in interface controller of WDC1, and a context node of WDC2 will be known as external mapping. In that case context node data from WDC2 will flow to WDC1.

Hook methods: As soon as you create a WD component, many hook methods will be automatically will be available at WD component level, view level, Window Level. In one of my post, I have very elaborately described about the Hook methods and their order of triggering in normal as well as in special scenarios. To know more ClickHere and Here

Singleton Node: We will understand this with one example. Suppose there is one node which will have sales order header related information. Now this node has another sub/child node which is meant for the item level information. In normal scenario if both of these nodes are normal node, if the parent node has 10 header records, child node will have the item level information of all the 10 sales order.

Now in case the child node is defined as singleton node, this child node will only contain item level information for the sales order which is currently selected. This is huge success in improving the overall application performance.

Supply function: While defining the context node we can give the supply function also. This supply function is meant for providing a value to the context node. Supply function will gets triggered if the data of the context node is being used and its value is either initial or invalid. Context node’s value will be invalid if it’s a singleton node and the lead selection of the parent node has changed. In that case supply function will get triggered and will calculate the new value based on the parent node’s data.

Apart from the ABAP Webdynpro terms I covered in last 3 posts, I have already shared many ABAP Webdynpro related posts in my blogs. While you can go through the blog to find more, here are few links of the important posts.

Deploy ABAPWebdynpro application in SAP Enterprise portal 

Default leadselection in ALV in ABAP webdynpro

Disable empty rowscoming in Webdynpro ALV

Dump (System_name :is not a valid attribute type) in starting the Webdynpro Application 

Radio button as a cell editor for a column in Table UI element - Part 1 

Radio button as acell editor for a column in Table UI element - Part 2 

Different types ofwindow creation in Webdynpro

Cell Variant: A wayto use multiple editor in a single table column in webdynpro ALV 

Floor Plan Manager:FPM application using OIF


Use ofIF_FPM_UI_BUILDING_BLOCK interface in FPM and triggering sequence of itsmethods 


I’ll continue posting more basic concepts and exercises in my further post. Till then Happy Learning :)

Monday, 25 January 2016

Basics of ABAP Webdynpro: Getting familiar with Webdynpro jargons part 2


Component usage: To use the functionality of other WD component (say WDC1) in our component (say WDC2), we have to do the component usage of WDC1 in WDC2 at component level. While implementing ALV, We make use of a standard component salv_wd_table in our component.

Controller: Below are the available controllers in WD component.

                Component Controller: This controller is at the component level and can be assumed like a global controller. We can defile context node, attributes, methods here and those will be accessible throughout the component in any view or in any method.
                View Controller: Each view comes with a view controller and like component controller, we can define context node, attributes, and methods here also, but their visibility and accessibility will remain till this view only. Apart from it we can define inbound/outbound plug also in view controller.
                Window controller: Every window will have a window controller. Window controller is also a global controller.
             Interface controller: A WD component will by default have Interface controller. Any context node, event and method whose interface property is checked, will be visible in interface controller. When we use such component in any other component (though component usage), we will be able to use those nodes, events and methods. Any view which is bind to a window will automatically be available to interface controller.
                 Custom controller: This controller can be created additionally in any WD component and will have the same effect as component controller.

MVC architecture: Like any other current UI technologies, ABAP WD is also based on Model View Controller architecture.

Model: This part is solely responsible for fetching the data. How this data is going to be displayed on browser is none of its business. In WD ABAP we have provisions of giving assistance class at component level, which can have all the methods for fetching the data. For that matter, even any normal class can play the role of model.
View: View is meant for displaying the data on browser. What data will be displayed, it will get from Model. We design view in WD component and while doing so, our only aim is to give the best possible user interface experience to customer. All screens designing stuff is entirely segregated from data fetching.
Controller: Controller comes in between model and view and binds these 2 components together. Also all the intermediate processing is done here.

To be Continued...

Happy Learning :)


Tuesday, 12 January 2016

SAP SD Process flow


In our last post we discussed about the MM process flow. In this post we will discuss about the SD process flow.

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

Inquiry (Tcode for creation VA11,VA12,VA13. Tables VBAK,VBAP)
The inquiry is therefore a request from the customer for you to provide him with a sales quotation.

Quotation (Tcode for creation VA21,VA22,VA23. Tables VBAK,VBAP)
A quotation presents the customer with a legally binding offer for delivering a product or providing a service within certain fixed conditions.

Purchase Order (Tcode for creation ME21,ME22,ME23. Tables EKKO,EKPO)
A purchase requisition was created from the sales order. In purchasing, a purchase order is created based on this requisition.

Sales Order (Tcode for creation VA01,VA02,VA03. Tables VBAK,VBAP)

Delivery (Tcode for creation VL01,VL02,VL03. Tables LIKP,LIPS) 
As soon as the material availability date or the transportation scheduling date for a schedule line has arrived, the schedule line becomes due for shipping. When you create a delivery, you initiate shipping activities such as picking and transportation scheduling

Shipping (T-code is VT01, Tables are VTTK, VTTP)
collection of deliveries which has to be delivered if route is same. Once goods are shipped, go for billing.

Billing (Tcode for creation VF01,VF02,VF03. Tables VBRK,VBRP): 
Billing is the last / final settlement between client & his customer.

Invoice (T-code is VF21, Tables are VBRK, VBRP) 
Invoice ends the sales flow.

Happy Learning :)

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 :)