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.  

Tuesday, October 30, 2012

Creation of a Logical Database

Creation of a Logical Database

Go to transaction  'SE36' or 'SLDB'. 
 
Enter the logical database name as shown above . 
  
If we are using Logical Database for HR purpose, we should check the check Box “Info types (HR only). Press CREATE Button as shown above. 
It would prompt for package name and workbench request   . 
 
On pressing Save button, following screen appears, prompting for the details of the root node.

Working with Table Maintenance Generator

Working with Table Maintenance Generator

Go to SE11 and enter the Z table name for which the table maintenance generator has to be generated. Click on Change. 
 
Click on Utilities Ã  Table Maintenance Generator
 
 

Creating a secondary index

Creating a secondary index

There are two types of indexes: Primary index and secondary index. Primary index is automatically created using the primary keys defined. 
Secondary index could be created as per the user requirement. This article discusses about creating a secondary index. 
Go to transaction SE11. 
 
For our demo purpose, we have considered the table ZAUTHOR. 
To know if there are any secondary indexes available, click on Goto Ã  Indexes
 
Following popup appears:
 


Creating Type Group and using it in the ABAP program

Creating Type Group and using it in the ABAP program

Introduction: This document explains the creation of type group and its use in ABAP program.
What is type group: There are several type groups available in SAP. For example ‘ABAP’ and ’SLIS’ etc. To use them in program we use key word ‘TYPE-POOLS’. It allows us to define non-predefined types. Combination of all such non-predefined types is knows as type-pool or type-group. In simple terms, if we want to use some custom types in various programs then we need not define them separately, we can simply create a type group in ABAP dictionary and use that in our programs.
Steps to create:
Go to transaction SE11; select the radio button ‘Type Group’. Click ‘Create’ button.
  
Note: - Maximum length of type-group name can be ‘5’.  
Provide some meaningful description in short text  
Description: C:\Users\ashish_trivedi03\Downloads\My Document\Type group\2.PNG
And click on save button.  
Then next screen appears where we can write our source code as highlighted in the below screenshot. As an example, I have created two constants. One thing that needs to be taken care of while declaring the structures, constants, etc. in Type Group is that every object must start with ‘<name of type group>_’. In this example the constants that are declared starts with ‘ZATYP_’. The system gives syntax error in case the above naming convention is not followed.  

Creating Search Helps (Elementary and Secondary)

Creating Search Helps (Elementary and Secondary)

Go To SE11 T-code.
 
Select the radio button of search help.
 
Provide the search help name. Select the create button. 
 
Select ELEMENTARY search help.

Creating a Structure in ABAP Dictionary

Creating a Structure in ABAP Dictionary

Go to transaction SE11 and select the radio button “Data type”. Enter a structure name starting with Y or Z. 
Press create button. 
A pop-up screen appears with 3 different options. Select the radio button structure
 The screen will be displayed like this.
Provide the description and also components.

Creation of Transparent Table

Creation of Transparent Table

  1. Enter the table name and press Create
  2.  
    1. Enter the description, Delivery class and check on table maintenance allowed. Then click on the tab Fields.
    1. Enter the ZCHAR in fields tab and ZCHAR_DE in field type tab.
    1. Double click on ZCHAR_DE. Then it will ask for Save. Press ‘YES”.

Wednesday, October 24, 2012

Difference between transactions RS12 / SM12 ?


Difference between transactions RS12 / SM12 ?

Seems there is no difference; at least as of BW 3.0 and above. According SAP Note316329 - Master data table locked locks on master data were handled differently in BW versions 2.0 – 2.1C. The difference is that not standard SAP lock mechanism was used but there was BW specific locking mechanism used. This was however removed in version 3.0 and subsequent. Therefore transaction RS12 is still in BW just because of BW history. As you can see the same ABAP report (RSENQRR2) is called by both TAs.



Other ways of starting Process Chains


Other ways of starting Process Chains

If you want or need to avoid tracking of starting process chains by transport system asking you to provide transport request number there are few possibilities available.

  1. You can trigger process chain via standard ABAP Function Module: RSPC_API_CHAIN_START. Using this FM you can start PC that is scheduled to be executed via meta chain (Start via Meta-Chain or API) and you do want to change it to direct scheduling.
  2. Starting your PC via custom ABAP report. This report would call FM mentioned in point no.1.
  3. Start PC via event. You can maintain custom event in TA SM64. The event that you created than specify into PC’s start variant.
  4. Exclude changes into PC’s start variants and PC’s processes from BW’s Transport Connection. You can customize this in RSA1->Transport Connection->Object Changeability

Full Process Chain’s API:
RSPC_API_GET_CHAINS
RSPC_API_CHAIN_GET_STARTCOND
RSPC_API_CHAIN_START
RSPC_API_CHAIN_GET_STATUS
RSPC_API_CHAIN_GET_LOG
RSPC_API_CHAIN_GET_PROCESSES
RSPC_API_PROCESS_GET_INFO
RSPC_API_PROCESS_GET_LOG
RSPC_API_CHAIN_MAINTAIN
RSPC_API_CHAIN_RESTART
RSPC_API_CHAIN_INTERRUPT

Online documentation on this topic:

Tuesday, October 23, 2012

SAP HANA for Beginners


                   SAP HANA for Beginners


Everyone has to start somewhere. And yes, I was a SAP HANA beginner at one time, too (going back to the first days of BW Accelerator). The great news is that we have a wealth of information and plenty of learning opportunities about SAP HANA out there and much of it is available for free!

Are you new to and want to learn about SAP HANA? Congratulations and welcome to the SAP HANA community! In the world of SAP HANA, you want to learn fast, of course. So in the spirit of "Accelerated Learning" (Four Phases of Learning), I suggest a few steps for you to get started. Just understand that you can spend hours or days behind each link below and get lost in cyberspace. Bookmark this blog so you always have a place to come back to continue your SAP HANA journey.

Note: This blog covers SAP HANA as a database and platform. We will have to cover learning about specific applications that run on top of SAP HANA another time.

Phase 1: Explore

As a first step, browse the SAP websites and see what others have done or plan to do with SAP HANA. This can be very exciting especially if have some aha-moments like "Wow, I didn't think this was possible" or "Awesome, I will try this myself" or even better "Spectacular, I will use SAP HANA for my start-up company and become rich".

Four Phases of Learning


How Many Accelerated Learning Phases Are There?
In the training world, the optimum number seems to be “four.”  There are four learning styles, four stages of competence, and a four-level evaluation model.
There is also a four-phase learning cycle.
There are different ways of thinking about the learning cycle and different numbers of phases.  Some educators have proposed four phases, while others have proposed five or even six.  There are also different names for these learning cycles.
I am sticking with the number “four,” and I like the name Dave Meier uses in his teaching about accelerated learning theory.  He calls it simply the “Four-Phase Learning Cycle.”  This is what it is:
  • Preparation: Arousing Interest
  • Presentation: Encountering the New Knowledge or Skills
  • Practice: Integrating the New Knowledge or Skills
  • Performance: Applying the New Knowledge and Skills

Sunday, October 21, 2012

How to create cell definitions in BEx report?


How to create cell definitions in BEx report?


Cell definition is functionality available in BEx Query Designer tool which allows you to address every cell of your Bex report in particular. By this you can uniquely define content of each cell. 

You may face a situation when you want to create cell definition in your BEx report but icon of cell definition is not appearing. First of all there is a prerequisite for cell definitions. It is that you must have a two structure in your report. One structure would be in row and other in columns. By intersection of those two structures you address every each cell.

While you have two structures ready in your report then icon of cell definitions on BE’x toolbar is available:




If you click on that icon you get into new tab strip in BEx Query Designer where you can design your cells:


Useful links:

Accelerated CO-PA with SAP HANA


Accelerated CO-PA with SAP HANA


CO-PA Accelerator is a one of HANA accelerators which are basically tools for speeding up of existing e.g. ECC’s functionalities leveraging SAP HANA. In particular case of this accelerator CO-PA’s operating concern data is transferred to HANAdatabase. Reporting on CO-PA data then is on HANA’s in-memory DB rather than to classic ECC’s relational DB.

CO-PA Accelerator comes with ECC’s version SAP ERP 6.0 SP21. Furthermore I detail customizing steps that are needed in order to enable integration of HANA with ECC’s CO-PA.
Customizing is available in TA SPRO-> Controlling -> Profitability Analyses -> Tools-> SAP HANA Integration -> Set up SAP HANA Integration:



Suite of helpful BW programs – BW Tools (ST13->BW-TOOLS)


Suite of helpful BW programs – BW Tools (ST13->BW-TOOLS)

I do not remember when was it for 1st time when I found this tool mentioned in SDN’sforums. I think it was related to process chains analyses. This tool covers analyses of process chains run time as well. 

Basically tool is indented to be used predominantly by SAP Active Global Support Team to support performance analysis in the areas of BW-IP (Integrated planning); BW reporting etc. Customers are free to use this tool too (according PPT attachment to note 1035990). Don’t be surprised if TA ST13 is not present in your system. The thing is that tool is coming with ST-A/PI component (Service Tools for Applications Plug-In). ST-A/PI component is so called Service Software Framework used to handle so called SAP EarlyWatch/GoingLive sessions. I was blogging about those sessions before hereand here. 

Depending on version of ST-A/PI that you have deployed in your BW system selection screen of TA ST13 may look like:


From this screen kindly observe that those are BW tools available in ST13. More details about particular tools are here:

Deletion of temporary database BW objects


Deletion of temporary database BW objects


It might happen that because of upgrade of BW system, maintenance activities, inconsistencies etc. you need to reorganize temporary BW objects. These kinds of objects are starting with following name convention: 

/BI0/0X*

Where X means different temporary object given by specifics circumstances which occurred when the object was created. E.g. /BI0/06* are tables used during BEx query processing. Refer to SAP Note 449891 for more object types.

If you face situation that you are running out temporary objects you can delete temporary object. You can use report SAP_DROP_TMPTABLES to reorganize them. Report deletes them pretty straight forward with checking either they are used at the runtime of report. Therefore it is advisable to run this report as a part of maintenance activities in defined time frame when no regular activities are happening in the BW system. Make sure no user is running queries, no data load is happening, no compression is in place etc.

Notice that report’s runtime is depended on how big your system is. In general if you going to run it for first time it might be that it will run for several hours.

Short history of SAP GU


Short history of SAP GUI

Every information system needs to interact with the user in some way. Basic term GUI(or frontend) stands for Graphical User Interface and its common function is allow user to connect to the system and show /process user interaction (e.g. user’s inputs) with graphics in addition to text information. Predecessor to graphics interface was text based interface – CLI (Command Line Interfaces). As an example you can imagine first computer terminals. Then mouse (or other pointing device) feature was added and finally developed to GUI.
SAP AG intended to have a user centered design of their software. Over the period SAP GUI followed improvements as their flagship ERP - software. As a first step there was anR/2 user interface based on terminal screens.
It had following features: only on screen menu, list of function keys, message area, lines to separate field groups, question mark indicated required field.






SAP NetWeaver 2004s ABAP miniSAP - installation


SAP NetWeaver 2004s ABAP miniSAP - installation

It ‘s been 5 years that I’m using miniSAP based on basis version 4.6. I obtained it as a CD included in ABAP Objects: Introduction to Programming SAP Applications book.
At that point of time it was extremely useful for me to have such a nice playground to try my first ABAP codes and getting into basis module. I ran it on my notebook so I was able to play with it in time that I could not use more effectively like on airports, in trains and etc. After years passed and SAP introduced first version of WAS it was 6.10 I tried to install it to my laptop as miniSAP as well.
But version like 6.10 and 6.20 I didn’t find very useful and due to the fact that I had a high volume of my ABAP codes running in 4.6 I stayed with this version. Anyway the new functionally like more OO oriented ABAP, BSP, webdynpro and other new featured of WAS forced me to taka a look on the newest WAS version 7.10. On the download section of SDN they released SAP NetWeaver 2004s ABAP miniSAP on approximately early of autumn of 2006. Because I’m interesting in ABAP stack of SAP NetWeaver Application Server I’ve downloaded Full ABAP Edition-Trial (with Web Dynpro for ABAP).

How to search for the data in PSA – choice 2.


How to search for the data in PSA – choice 2.

How to search for the data in PSA – choice 2.

In my previous post I showed how to search for the date in PSA via standard transparent table in dictationary which underlay behind the PSA. There is another possibility more convenient in BW manner. The idea is to create DataSource of PSA and then check the data with standard BW tool: Extractor checker (TA RSA3).
At first we create DataSource for particular node in PSA tree. Navigate yourself in the PSA tree and choose item “Generate Export DataSource” from right click menu. In this way SAP BW does generates a DataSource for your PSA object.


How to search for the data in PSA – choice 1.


How to search for the data in PSA – choice 1.

Once you are working with SAP Business Warehouse (BW) your job is about data analysis most likely. You need to find check the data in data targets (info cubes/ODSs) explore how data got into these objects, what is the transformation logic and when the bug is somewhere here to compare the data in source or in the PSA area with the data in targets.
One of the ways how to search for the data in PSA is described in following material. First navigate to your DataSource in PSA tree within Modeling section in Administrator section in TA RSA1 and choose “Delete PSA data” item from right click menu:

BPC Using SQL Server 2008 Integration Services with SAP BI 7.0


BPC Using SQL Server 2008 Integration Services with SAP BI 7.0


Summary: This white paper demonstrates the use of the Microsoft Connector 1.0 for SAP BI in Microsoft SQL Server 2008 Integration Services packages. It shows how to load data into SAP BI by using the SAP BI destination, how to extract data from SAP BI by using the SAP BI source, and how to prepare extracted data for analysis in SQL Server Analysis Services.

Microsoft Connector 1.0 for SAP BI is delivered in the Microsoft SQL Server 2008 Feature Pack. It enables data extraction from and to SAP NetWeaver BI in both Full and Delta modes via standard interfaces, within the Microsoft SQL Server Integration Services environment. The SAP datasets supported by the connector include SAP BI InfoProviders like InfoCubes, Data Store Objects (DSO), and InfoObjects.
The Microsoft Connector 1.0 for SAP BI has three main components:
  • SAP BI Source, to extract data from SAP BI
  • SAP BI Destination, to load data into SAP BI
  • SAP BI Connection Manager, to manage the RFC connection between the Integration Services package and SAP BI
Microsoft Connector 1.0 for SAP BI is an add-in for SQL Server Integration Services. It provides an efficient and streamlined solution for integrating non-SAP data sources with SAP BI. It also enables the construction of data warehouse solutions for SAP data in SQL Server 2008, where SAP BI is exposed as a data source of SQL Server.

Microsoft Connector 1.0 for SAP BI has the following requirements:
  • Windows Server 2003 and later, Windows Vista, or Microsoft Windows XP Professional with Service Pack 2.
  • SQL Server 2008 Integration Services. Microsoft Connector 1.0 for SAP BI needs to be installed on the same computer where Integration Services is installed.
  • Windows Installer 4.5 and later.
  • Extracting data using Microsoft Connector 1.0 for SAP BI from SAP BI system requires the SAP Open Hub license. For more information about SAP licensing, consult your SAP representative.
  • On the SAP BI system, SAP_BW component support package level 16 (as part of SAP NetWeaver Support Pack Stack 14) is required. SAP_BW component support package level 17 or higher is strongly recommended.
  • To use Microsoft Connector 1.0 for SAP BI in 32-bit (64-bit) mode on any 32-bit (64-bit) operating system, The 32-bit (64-bit) version of librfc32.dll needs to copied to the following location: %windir%\system32.
  • To use Microsoft Connector 1.0 for SAP BI in 32-bit mode on a 64-bit operating system, the 32-bit librfc32.dll needs to be copied to the following location: %windir%\SysWow64.