Google+ Facebook Twitter MySpace SC

Sunday, November 25, 2012

Creating a WebDynpro ALV Application in 30 easy steps


Creating a WebDynpro ALV Application in 30 easy steps


1.1     Background

More and more Web based applications are being used for different business processes. Enterprises use the web-based applications in order to expand their clientele and suppliers in a cost-effective way. Even in the ERP space there has been a paradigm shift from creating generic system based applications to creating more universal applications to make it easy to maintain and for better interaction with other systems.
The SAP Web Dynpro is based on a model driven framework. It is platform independent and defines a standard structure for UI of applications. Web Dynpro applications are based on Model View Controller (MVC) design.

1.2    Pre requisites:

To be able to use this document, one has to be familiar with WebDynpro for ABAP and must have created an ALV application using Web Dynpro.
PURPOSE: SAP has come up with a lot of tutorials and e-learning documents to train beginners in this new UI technology. Based on my experience, I am presenting herewith, certain additions to those. There are code snippets and examples for functionalities, which are usually desired by the clients in Web Dynpro reports.

The ALV application:
Create a web dynpro application with ALV component in it.
         
Step 1: Open transaction SE80 and from the drop down list select WebDynpro Component.

Step 2: Enter the application name (Here ZSAM_TEST).

Step 3: You will get a pop up as shown above. Click YES.


Implementing Enhancements in a view

Implementing Enhancements in a view

“In this tutorial, I would like to explain about Implementing Enhancements in a Webdynpro View. If you do not wish to display certain UI elements that exist in the layout, you can suppress such elements in your enhancement. The Enhancement can be created using the SAP standard webdynpro applications and custom applications. In this tutorial I am doing enhancement in custom application that should be in display mode and simply select the respective UI element and then choose its context menu entry Remove Element”. 
In this demo, I am executing a WebDynpro application that already exists.  
 
The application having two images result shown below  
 
Get back to the Webdynpro component and select the “Layout” in the view for UI enhancement and you can observe two different Groups in the “RootElementContainer”.

Displaying text and radio button using WebDynpro for ABAP

Displaying text and radio button using WebDynpro for ABAP

Development Objectives: 
In this step-by-step documentation you will create a simple Web Dynpro component, which consists of one view. For the view, you will create a view context, which is linked to a Textview and RadioButtonGroupByIndex elements on the view layout and which contains the adding data. This RadioButtonGroupByIndex will be displayed in the browser at runtime. Furthermore, you will create a Web Dynpro application for this simple Web Dynpro component, which can be run in the browser. 
Procedure  
Creating a Web Dynpro Component 
  1. Start ABAP Workbench (SE80) and select Web-Dynpro-Comp./Intf. from the available object list.
 
  1. To create a new Web Dynpro component, enter the name ZWD_RB_DEMO for the new component in the selection dialog of the object list, and select Display.

WebDynpro for ABAP


WebDynpro for ABAP

Building a simple application

Scenario: To create and run a simple WebDynpro Application. We would accept an input value from the user on first screen and display the value entered on the second screen.
Note: Please refer to the SAP® help for detailed information of the components used in this document. 
Procedure: 
1.      Go to transaction SE80. Please note that there is no separate transaction for creation of WebDynpro application other than SE80. 
2.      Select “WebDynpro Comp./Intf” from the list (as shown below)
 
3.      Create a new WebDynpro component by the name ZSAPTECHNICAL_DEMO. 
 Assign it to the local object. 
4.      Right click on the WebDynpro component “ZSAPTECHNICAL_DEMO” and create a view.

Addition of extra fields in COOIS (Order info System)


Addition of extra fields in COOIS (Order info System)

The COOIS report (Order Info System) gives the complete information regarding Production Order like header report, Operation report, Component Report, document report.  
This document deals with the addition of extra fields in the output display of COOIS.  
For the demo purpose, I have added the material group (MATKL) for the production order material for header report.  
BADI Name: WORKORDER_INFOSYSTEM
Method: TABLES_MODIFY_LAY  
In the method TABLES_MODIFY_LAY there are many table parameters for different data display of the production order .In this scenario only the header detail structure is being extended with append structure.  
Add the extra fields to be displayed to through append structure to IOHEADER_TAB, here MATKL.  
In the method write the code for updating the field value.  
DATA : BEGIN OF st_matkl,
           matkl TYPE matkl,
           END OF st_matkl.
  DATA : st_header TYPE ioheader.
  LOOP AT ct_ioheader INTO st_header.
    IF NOT st_header IS INITIAL.
      SELECT SINGLE  matkl
             FROM mara
             INTO st_matkl
             WHERE matnr = st_header-matnr.
    ENDIF.
    st_header-matkl = st_matkl-matkl.
    MODIFY ct_ioheader FROM st_header.
  ENDLOOP.
Below is the screen shot with the material group field added :  

Finding the Enhancement Name and Project Name from function module exit name


Finding the Enhancement Name and Project Name from function module exit name


STEP 1  
Execute the transparent table ‘MODSAP’ and provide the function module name as shown below.  
  
Now Press F8.  
Now you will get the Enhancement Name for the function module exit.  
  
STEP 2  
Go to table ‘MODACT’ and provide the enhancement name as shown below and press F8.  
Now the project name associated with the enhancement name is displayed.  

Hiding SAP Netweaver login screen while opening Webdynpro Application


Hiding SAP Netweaver login screen while opening Webdynpro Application

Introduction
This article is to hide SAP Netweaver login screen by directly opening the Webdynpro ABAP application. Usually Webdynpro application first opens SAP Netweaver login screen then only it proceed to the application’s home page. This can be overcome by applying some setting to the specific application through SICF transaction. In this way, it is possible to improve the performance of the application by skipping the three successive login screen actions.

Objective

To hide SAP Netweaver login screen by directly opening the Webdynpro ABAP application.

Steps

In this application, first create a Webdynpro component and application to display text in the application. Then to do settings through SICF transaction to hide the login screens for that application.
Part 1
1.     Create one Webdynpro Component  
Go to SE80 -> Create Webdynpro component.