Friday, 27 May 2016

SNOTE 0002269215: After an upgrade a UI element is not visible any more

SAP server up-gradation brings with it many issue. One such issue was faced recently when server was upgraded from ECC6 EHP5 to ECC6 EHP7.

One of the WD application was having charts and graphs in display. After up-gradation, everything works but chart were not coming. After a lot of struggle, issue was raised to SAP. SAP comes up with a SNOTE. SNOTE number is 0002269215.

According to this note, height of the container UI element (which was eventually containing the charts/graphs) comes as 100% by default when we use that container. This height was supposed to be changed to a fixed size eg. 300px, 400px in new version.

Once done, graphs/charts were coming as earlier.
 
Happy Learning :)

Thursday, 12 May 2016

Dump while exporting the ALV data into local file


Recently I confronted to one issue in ALV. ALV was being implemented through Oops and data was being displayed. Everything was perfect but when user tried to export the ALV data to local file, it was going into below dump.
This dump was coming into a standard report and the export function is also the standard one. So actually there was no point of its not working. I started debugging and the issue came out to be in our code only.
Actually we have created field catalog based on one data dictionary structure. And final internal table to be displayed was based on one locally defined structure. Now this locally defined structure was having every field of dictionary structure except one. And this was causing error.
When control was going into program SAPLKKBL it was doing a case-end case on field catalog and in each case, it will look for that field in final internal table and will try to assign a field symbol. Now because one particular field was there in field catalog but not in final internal table, it was going into the case but when it tries searching for that field in internal table it was not finding anything and field symbol remain unassigned. And this dump was coming.
Now this is beautiful. One small issue in Z code was causing dump from standard code. Strange.
Happy learning :)


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


Sunday, 24 January 2016

Basics of ABAP Webdynpro: Getting familiar with Webdynpro jargons

This is the first post of a series on ABAP Webdynpro basics. Prior to actually starting the WD part, this post is about the terms we commonly use while working in WD. Going through this post will make you comfortable reading the further post on this series. So here, let’s start..

Webdynpro Component: The object which we create using SE80 is WD component. While creating WD component, we have to give one view and one window’s name of this component. A WD component can host any number of views and windows.

Webdynpro application: When we are done with the creation of WD component, at last we have to create the WD application. While creating application, we have to give which window out of many existing; we want to be displayed while opening the application. This WD application will have a URL in it, which we will give to our customer for using the WD application.

View: WD component can have any number of views. View means the screen or pages which we want to see in WD application. All the UI designing part we do here in view.

Window: Again a WD component can have any number of windows. Windows basically contain the views. Each and every view has to be attached to some window in order to get displayed in the WD application. A window can have multiple views. So we have to make a view as default view of the window. So in case this window is going to be the WD application’s opening window, you can guess which view, out of many views which window holds, will going to be opening view.

Inbound/Outbound Plug: Now we have a window and this window has multiple views. We want to navigate from view1 to view2. Here plugs will come into picture. View1 will have the outbound plug and view 1 will have the inbound plug. And in window we will attach the outbound plug with the inbound one. Whenever we want the navigation, we will simply fire the outbound plug.

Context node: Context nodes are the entities which will actually be attached with the UI elements in order to be displayed. Of course we will make the local variable also, but ultimately we have to bind those variables to context node and context node will in turn be bind to UI elements.

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