8.15.2008

SAP Netweaver

In the present era, where companies are struggling to unite various heterogeneous environments in their organizations and maintain a lower Total Cost of Ownership (TCO) NetWeaver comes as a solution to all their problems. SAP NetWeaver is the latest advancement in the mySAP Technology, which was developed as an Artificial Intelligence (AI) shell that accepts standard comments, literally as they are spoken, by domain experts.

Another unique feature of NetWeaver™ that makes it stand out amongst other software technologies is its modularity. The knowledge engineer can more easily create "digestible chunks" of modules or sub-dependency networks, which help to keep the overarching dependency network from becoming potentially incomprehensible because of apparent complexity. This text is aimed at explaining SAP NetWeaver architecture and its interoperability with Microsoft.NET and IBM WebSphere. In addition it aims at bringing out all the advantages that are associated with SAP NetWeaver.

Net Weaver in simple words is an application and Integration platform in which Web Services play a major role and which is open for Non-SAP applications and platform. It is used by organizations to improve productivity and enhance efficiency by making all the resources that are available in an enterprise to work collectively. The SAP customers to bring heterogeneous environments at one platform use SAP NetWeaver. In addition, it enables customers to use the already existing systems without putting in much investment. Further in the near future, the various corporate sectors and Organizations have to take a decision for some common platform; could be Microsoft .NET, IBM Websphere or SAP NetWeaver. Irrespective of the choice that they make, SAP NetWeaver is the one that integrates with all the three technologies.
Read This Nugget: As it’s name suggests, Enterprise Core will contain the inward, enterprise processes that make the enterprise work. The outward, collaborative processes will not be included in Enterprise Core. They will be included in what is called Enterprise Extensions.

SAP NetWeaver attains the process of integration by integrating all the available heterogeneous resources of the existing system and unifying them into a homogeneous form. This integrated information forms the basis of total, comprehendible, focused solution as desired in an enterprise.
2.0 NetWeaver Object Model and Enterprises Architecture
This section focuses on overview of the object model of NetWeaver. This basic knowledge facilitates the organizations in constructing an apprehensible knowledge base. The various components that are present in NetWeaver Object Model are Data Links, Dependency Networks, Nodes and in some cases, evaluation groups. Each of these components and their function in the NetWeaver Object Model is described below:

* Data Links: These objects of the NetWeaver function to request data about the real-world objects. They can also be defined as the objects that have one-to-one relation with the real-life objects and can be logically and mathematically manipulated. Thus, making the knowledge representation in NetWeaver simple as well as insightful. Moreover, these objects are reusable and can be referred as and when required.

* Dependency Networks: The dependency networks in NetWeaver play the central role in formulating the representation of the problem. These dependency networks are used to interconnect different objects in the object model. Therefore, they are considered to be the most important factor in the object model of NetWeaver. Using the "New Network" that is present in the network window can create a new dependency network. Also, new dependency networks can be added in the object model in the later stages without creating any interference with the already existing knowledge base.

* Nodes: Nodes function to form the relation between data links and dependency networks. Nodes are classified into logical nodes and functional nodes. The logical nodes define the dependencies of the network on its antecedents and the functional nodes are used to construct the mathematical relation in the data links.

* Evaluation Group: An evaluation group is a user-defined collection of networks. An evaluation group specifies a collection of networks that are conceptually relevant to one another and that the knowledge base designer wants to see evaluated as a set.
3.0 Interoperability of SAP NetWeaver with Microsoft .NET
SAP along with Microsoft is creating a development kit, which enables to create Iviews inside Microsoft Visual Studio.

The Iviews help in integrating information and functions from a wide range of sources in an enterprise portal. It helps in developing portal content on your preferred platform. It also helps in accessing and gathering Information consistently. This is achieved by integration of SAP Knowledge Management and data management tools such as Microsoft Content Management Server. This integration centralizes the Knowledge base and helps in coordination of processes, which cover various Technologies e.g., SAP NetWeaver supports an environment in which SAP Exchange Infrastructure and Microsoft BizTalk Server can exchange information.

Additionally, SAP Web Application Server, which is a component of SAP NetWeaver, supports platform independent Web services and the same Web services as standards as Microsoft, including Extensible Markup Language (XML), Simple Object Access Protocol (SOAP), Web Services Description Language (WSDL), and Universal Description, Discovery, and Integration (UDDI). For Microsoft .NET, SAP’s .NET connector provides a highly scalable and reliable communication infrastructure, as well as a Microsoft Visual Studio .NET Add-In to simplify development.

4.0 Interoperability of SAP NetWeaver with IBM WebSphere

Interoperability of SAP NetWeaver with IBM WebSphere takes at People, Information and process level. This interoperability helps in developing portal content on your preferred platform thus saving investments. SAP NetWeaver supports groupware and collaboration products such as Lotus. It helps in accessing and gathering Information consistently. This is done by integration of SAP Knowledge Management and data management tools such as IBM Content Manager. It also centralizes the Knowledge base and helps in coordination of processes, which cover various Technologies e.g., SAP NetWeaver supports an environment in which SAP Exchange Infrastructure and IBM WebSphere Business Integration can exchange information. As mentioned earlier, SAP Web Application Server, a component of SAP NetWeaver, supports platform-independent Web services and other primary technology standards including J2EE Connector Architecture (JCA) and Java Message Service (JMS). SAP Java Connector is a toolkit that allows a Java application to communicate with any SAP system. It combines an easy-to-use API with extraordinary flexibility and performance. The package supports both, Java-to-SAP, as well as SAP-to-Java calls. Customers using IBM WebSphere can easily access existing business objects and integrate their applications with any SAP application.

5.0 Creating an ASP .NET Web Application Using the SAP .NET Connector

SAP.NET Connector along with Microsoft.NET can be used to create Web Applications. The following example illustrates creating .NET project using Microsoft Visual Studio. NET. Here, a client application reads and displays customer data from an SAP System using a search value and then displays it in a data grid.

The example uses the function module RFC_CUSTOMER_GET, which requires that customer data exist in the target SAP System, for example, in IDES. Although it is possible to rename all development objects and generated proxy classes, default names are used in this example. This example is provided as part of the connector sample code (DNCWebApp).

Procedure of Creating an ASP .NET Web Application Using the SAP .NET Connector:
1. Open Microsoft Visual Studio .NET.

2. Create a new C# Web form project:
Choose New. New Project. Visual C# Projects. ASP .NET Web Application.

You can also create a project in any other common programming language for .NET, for example, in Visual Basic .NET. In this case, you must add the SAP .NET proxy classes as a separate project in the Microsoft Visual Studio .NET solution.

3. Rename the form Webform1.aspx to Default.aspx.

4. Add Web controls to your Web form.

5. Add proxy classes to connect the Web applications to your SAP server.

#

a. In the Solution Explorer, right-click on your project.
#

b. Choose Add. Add new item.
#

c. Select Web Project Items.
#

SAP Connector Class and choose Open.
#

The SAP .NET Connector Wizard opens.
#

d. Decide from where you want to generate the proxy classes.

Proxies can be created from

* - Web Services Description Language (WSDL) files that originate in an SAP interface repository (IFR)
* - An SAP server
* - Standard WSDL files

#

e. Select the client proxy object type and select beautify names option.
#

f. Select the Remote Function Modules (RFM) you want to use in your proxy object.

You can use search filters to look for the Remote Function Modules. In the example, enter the search argument RFC_CUST* in Name-Filter and select RFC_CUSTOMER_GET.

#

g. Add the modules to your proxy object and choose NEXT.

The proxy classes for the referenced table and structure types are automatically created and added to the project.

6. Build the solution with Build. Build Solution.

7. Create an SAP Login page to support user name and password authentication

#

a. In the Solution Explorer, right-click on your project.
#

b. Choose Add. Add new item.
#

c. Select Web Project Items. SAP Login Form

Leave the name as SAPLogin1.aspx.

8. Set the system connection information in the destination object of the SAPLogin1.aspx page:

#

a. In the Solution Explorer window find the item SAPLogin1.aspx and double-click on it to bring it up in the designer.
#

b. Look for the component destination1 on the bottom of the form.
#

c. Click on the destination component and set the properties for connecting to your SAP system (for example AppServerHost and System Number). The other properties like client, Password and username will be set from the login page.

9. Data bind the data grid to BRFCKNA1Table:

BRFCKNA1Table is the parameter of RFC_CUSTOMER_GET that contains the list of customers.

#

a. Select SAP Table Wizard from the SAP proxy toolbox and Drag Drop it to your working area. In the dialog box, select BRFCKNA1Table.
#

b. Select the data grid, and under Properties change Data Source to BRFCKNA1Table using the drop down list.
#

c. Customize the list of columns displayed on the data grid by modifying the Columns collection property.

10. On the default.aspx page, double-click the Button control you added earlier to create an event handler for the control.

11. Add the connect code to your project:
Select Connect code from the SAP proxy toolbox.

Drag Drop it in the source code of your event handler. A fragment of sample code is then inserted. It connects to the SAP server using the authorization settings from the Proxy Wizard. Normally, you must change these settings.

The syntax for the application will be

private void btnSearch_Click(object sender, System.EventArgs e)

{

// Declare parameters here

SAPProxy1 proxy = new SAPProxy1();

try

{

proxy.Connection =

SAP.Connector.SAPLoginProvider.GetSAPConnection(this);

// Call methods here

proxy.Rfc_Customer_Get("", txtCust.Text, ref brfcknA1Table1);

// Now update Data Bindings. On WinForms this will be automatic, on

// WebForms call the following line

this.DataBind();

}

catch(Exception ex)

{

// If SAPLoginProvider.GetSAPConnection(this) cannot get a connection,

// we might get an error.

// Normally this can be ignored as it will automatically will force a

// relogon.

}

}

12. Build and run the application.

The browser window opens and you are redirected to your SAPLogin1.aspx login page.

13. Enter connection data (for example user, password and client).

If you select SAVE this login information will be stored as an encrypted cookie on your computer and will provide an alternative single sign-on capability the next time you wish to access the site. If you do not select SAVE, the login information will still be saved in the ASP .NET session state but will be lost once the browser is closed.

14. Enter a search argument, for example A* in the Textbox field and choose Search. Thus we create an ASP.NET Application using Visual Studio .NET using Proxy classes to connect to the server and Binding the DATA GRID. Your application connects to the SAP System and displays the requested data in the Data Grid.



6.0 Using the SAP Java Connector
SAP’s new Java middleware, the SAP Java Connector (JCO) allows customers and partners to easily build SAP-enabled components in Java. JCO supports both inbound (Java calls ABAP) and outbound (ABAP calls Java) calls in desktop and server applications.

In this Sample Program we connect to SAP and call two BAPIs.
Import statements: Any program using JCO should contain the following import statement:

import com.sap.mw.jco.*;

Otherwise, you have to fully qualify each class and interface which is very inconvenient.

Connecting to SAP
JCO.Client mConnection;

A connection (or session) with SAP is handled by class JCO.Client

try {
mConnection =
JCO.createClient("400", // SAP client
"c3026902", // userid
"********", // password
"EN", // language
"iwdf5020", // host name
"00"); // system number
mConnection.connect();
}
catch (Exception ex) {
ex.printStackTrace();
System.exit(1);
}

"A Client object is created via a call to createClient(). You can use a specific application server (as in the above code) or a server group (load balancing)." REFER the JCO Javadoc for the overloaded createClient() method for the latter possibility.

"The Client class's connect () method tries to log on to SAP. If that fails for any reason, an exception is thrown. If the call succeeds, we can now stay connected for as long as we like. When we are done, we can call disconnect () to explicitly log off."



6.0 Advantages of SAP NetWeaver

a. Enhanced Adaptability: Enhanced adaptability actually refers towards the adaptability of SAP NetWeaver towards the existing Business System in any organization. It provides a heterogeneous environment, integrating the various applications; databases and making available open technologies like web services readily available to the user. It saves money on unnecessary customization of the existing business System.

b. Lower TCO: SAP NetWeaver instead of replacing the existing system interweaves the various resources like databases, legacy systems; Internet based Information and provides a heterogeneous Environment for the user to get the maximum from the new unified system. It also prevents unnecessary customization of the entire system. Moreover, it reduces complexity and makes the system more comprehendible and flexible to the rapidly changing business processes. All of these lead to reduced the total cost of ownership.

c. Better ROI: SAP NetWeaver increases the return on investment. As mentioned earlier, by using this technology IT strategies can be synchronized with SAP solutions. This synchronization makes the system more reliable leading to better assessment services, which in turn lead to financial benefits.

7.0 Conclusion

NetWeaver uses a very transparent process to provide the ability to trace the logic structure right from the raw data to information, which can be used for analysis. It helps in developing portal content on your preferred platform. Interoperability of SAP NetWeaver both with Microsoft .NET and IBM Hemisphere takes at People, Information and process level. For Microsoft .NET, Sap’s .NET connector provides a highly scalable and reliable communication infrastructure, as well as a Microsoft Visual Studio .NET Add-In to simplify development. Further, Sap’s new Java middleware, the SAP Java Connector (JCO) allows customers and partners to easily build SAP-enabled components in Java. Thus, helping decision makers interpret and manipulate the output of the decision model that provides mathematically robust knowledge about complex problems. Hence, making SAP NetWeaver a Complete Solution for the Integration with various applications and platforms that are used in various organizations.
IF you find this ARTICLE interesting, Leave your comments.
read more...

AUTO INSURANCE QUOTE

Use
SAP Policy Management (FS-PM) is an integrated policy management system that is suitable for insurance companies operating on a global basis and for the regional market. This is guaranteed by integration in the SAP landscape.

Integration - auto insurance quote
SAP Policy Management is a central component of the insurance solution portfolio (SAP for Insurance), based on SAP NetWeaver 2004s (SAP NetWeaver Application Server ABAP 7.0).

This integration ensures that the communication with other SAP components, such as FS-BP (Business Partner), FS-CD (Collections/Disbursements), FS-CM (Claims Management), FS-ICM (Incentives & Commission Management), FS-RI (Reinsurance), and additional components is possible using defined interfaces. You can also connect systems from other providers.

Features
The following graphics show an overview of SAP for Insurance and the system architecture of SAP Policy Management:



Overview of architecture of SAP Policy Management. Auto insurance and statutory health insurance are potential LoB modules.

SAP Policy Management is divided into a basic part and into lines of business parts with industry-specific product models and business processes/transactions.

The Product Engine (msg.PM) linked to SAP Policy Management delivers the definition of the product structure used as the basis for policies, and for rating and plausibility check rules, and it also executes the calculations for each insurance product.

For more information, see:

● Collections/Disbursements

● In-Force Business Management

● Product Engine (msg.PM)

● Lines of Business

● Object Management

● Journal Management

● Fund Management

● Correspondence

● Accounting Component



read more...

8.13.2008

BW - Integration

Analysis of BW support navigation facilities integrated to BW 3.0

OLAP BAPI: SAP BW 3.0 comes with the OLAP BAPI Interface (OBI) which provides functions that can be used by third party reporting tools to access BW Info cubes. It provides an open interface to access any information that is available through OLAP engine.

Integrating with XML: OLAP BAPI serves as the basis for the SAP implementation of XML for analysis. It is an XML API based on Simple Object Access Protocol (SOAP) designed for standardized access to an analytical data provider over the web. The XML interface introduced with SAP BW 3.0 release accepts XML data streams compliant with the SOAP. Unlike all other SAP BW interfaces in XML interface the actual data transfer is initiated by the source system.

Open Hub Services: The Open Hub Service allows controlled distribution of consistent data from any SAP BW InfoProvider to flat files, database tables and other applications with full support for delta management, selections, projections and aggregation. Open Hub Services have InfoSpokes as their core metadata objects. With the SAP 3.0 release InfoSpokes have become generally available.

Content Management Framework: The SAP Web Content Management Server stores unstructured information that users can go through and use efficiently. Integration with the SAP BW content management framework provides an integrated view on structured and unstructured information to the end user.




read more...

Storage Service Layers

Understanding the role of storage services layers in architectural model

Master data manager: Master Data Manager generates the master data infrastructure containing master data tables as well as master data update and the retrieval routines. It also maintains master data and provides access to master data for use by SAP BW reporting components and for exporting to other data warehouse services for analysis and access services.
ODS Manager: ODS manager generates ODS data object infrastructure. It maintains an active data table for maintaining ODS object data, a change log for every update applied to the ODS object data as part of application process and provides access to ODS object data for SAP BW reporting and analysis functionality.
Archiving Manager: The Archiving Manager stores unused, dormant data in an archive with the help of Archive Development Kit (ADK). ADK is connected to the SAP BW via Archiving Manager. It also keeps track of relevant metadata such as Infocubes and ODS objects which possibly will change over time.

InfoCube Manager: It serves the function of generating the InfoCube Meta tables. It maintains InfoCube data tables and provides access to InfoCube data tables for SAP BW reporting and analysis.





read more...

ETL Components

Components of ETL Services at Database of File Level

* Operational Data Store: It stores detailed data and supports tactical, day-to-day decision making. A SAP view ODS as a near real-time informational environment that supports operational reporting by interacting with existing transactional systems, data warehouses, or analytical applications. SAP BW allows flexible access to data in the ODS, the data warehouse, and the multidimensional models.
* Data Marts: A data mart provides the data needed by a decentralized function, department, or business area. You need to weight the pros and cons before developing a data mart. For example, a data mart can be implemented faster and cheaper than a data warehouse, sometimes costing 80% less than a full data warehouse. But as data marts proliferate, the cost advantages can disappear. The IT organization must maintain the individual data marts and the multitude of ETL and warehouse management processes that go with them. Multiple data marts can complicate data integration efforts, increase the amount of inconsistent data, require more business rules, and create the data stovepipes that data warehousing strives to eliminate.
* Interfaces: The data mart interface enables users to transfer and update transactional data and metadata from one SAP BW system to other SAP BW systems.
* Open Hub Services: The open hub service is used to share data in SAP BW with non-SAP data marts, analytical applications, and other applications. This service controls data distribution and maintains data consistency across systems. With the open hub service, actual data and the corresponding metadata are retrieved from InfoCubes or ODS objects.





read more...

ETL Fundamentals

Fundamentals of ETL Service Architecture

ETL service comprises of two parts: Staging engine and Storage Service. Staging engine manages staging process for all data received from several source systems. It interfaces with the AWB scheduler and monitor for scheduling and monitoring data load processes. However, Storage Service manages and provides access to data targets in SAP BW and the aggregates that are stored in relational and multidimensional database management systems.

It is true, however, that the extraction technology provided as an integral part of SAP BW is restricted to database management systems supported by mySAP technology and that it does not allow extracting data from other database systems like IBM IMS and Sybase. It also does not support proprietary file formats such as dBase file formats, Microsoft Access file formats, Microsoft Excel file formats, and others. On the other hand, the ETL services layer of SAP BW provides all the functionality required to load data from non-SAP systems in exactly the same way as it does for data from SAP systems. SAP BW does not in fact distinguish between different types of source systems after data has arrived in the staging area. The ETL services layer provides open interfaces for loading non-SAP data.

Extraction at Service Levels



SAP BW can be integrated with other SAP components based on application programming interface (API) service. It provides a framework to enable comprehensive data replication based on data extractors that encapsulate the application logic. Data Extractor fills the extract structure of data source with a data from data source and offers sophisticated handling of changes. In addition to supporting extractors, the service APIs also enable online access via RemoteCube technology and flexible staging for hierarchies. On the other hand SAP provides an open interface called Staging Business Application Programming Interface (BAPI) to extract data from non-SAP sources. BAPI serves the purpose of connecting third- party ETL tools to SAP BW and provides access to SAP BW objects which facilitates use of customer extraction routines. Data can be extracted at the database level by using: DB connect, flat files and XML. DB connect facilitates extraction directly from DBMS. In this the metadata files are loaded by replicating metadata tables and views into the metadatory repository of SAP BW. Data can also be uploaded from flat files by creating routines for extraction of data and XML files can be extracted through XML via Administrator Workbench in SAP BW.

NOTE: SAP BW provides three ways to extract data at the database or file level: DB Connect, flat file transfer, and XML. SAP BW provides flexible capabilities for extracting data directly from RDBMS tables using DB Connect.


read more...

BW - Metadata Modelling

The administration services in SAP BW can be availed through Administration Workbench (AWB). It is a single point of entry for data warehouse development, administration and maintenance tasks in SAP BW with Metadata modeling component, scheduler and monitor as its main components as described in the figure hereunder:
Click on "READ MORE" for viewing the figure
Metadata modeling: Metadata modeling component is the main entry point for defining the core metadata objects used to support reporting and analysis. This includes everything from defining the extraction process and implementing transformations to defining flat or multidimensional objects for storage of information.


Modeling Features
* Metadata modeling provides a Metadata Repository where all the metadata is stored and a Metadata Manager that handles all the requests for retrieving, adding, changing, or deleting metadata.
* Reporting and scheduling mechanism: Reporting and scheduling are the processes required for the smooth functioning of SAP BW. The various batch processes in the SAP BW need to be planned to provide timely results, avoid resource conflicts by running too many jobs at a time and to take care of logical dependencies between different jobs. These processes are controlled in the scheduler component of AWB. This is achieved by either scheduling single processes independently or defining process chains for complex network of jobs required to update the information available in the SAP BW system. Reporting Agent controls execution of queries in a batch mode to print reports, identify exception conditions and notify users and pre compute results for web templates.
* Administering ETL service layer in multi- tier level: SAP’s ETL service layer provides services for data extraction, data transformation and loading of data. It also serves as the staging area for intermediate data storage for quality assurance purposes. The extraction technology of SAP BW is supported by database management systems of mySAP technology and does not allow extraction from other database systems like IBM, IMS and Sybase. It does not support dBase, MS Access and MS Excel file formats. However, it provides all the functionality required for loading data from non- SAP systems as the ETL services layer provide open interfaces for loading non-SAP data.



read more...

SAP Business Warehouse (BW)

Extract from the BW Cookbook Volume 1: "The SAP Business Information Warehouse enables Online Analytical Processing (OLAP) to format the information of large amounts of operative and historical data. OLAP technology enables multi-dimensional analyses according to various business perspectives. The preconfigured Business Information Warehouse Server for core areas and processes ensures information views within the entire enterprise."


Extract from the BW Cookbook Volume 2:

Settings In SAP (R/3) Source System

STEP 1. Install Plug-In

STEP 2. Defining Source System

TRANSACTION CODE: SPRO -> SAP Ref. Img ->

If R/3 system is 4.0B -> Cross Application components -> Distribution ALE -> Basic Settings -> set up logical system -> Maintain logical systems -> New entries -> maintain the entries as : ->


read more...

Send report as attachment in background

REPORT zpwtest .

TABLES : t001 .
TYPE-POOLS slis .

DATA : t_t001 TYPE TABLE OF t001 ,
t_abaplist TYPE TABLE OF abaplist .

DATA : w_abaplist TYPE abaplist .

SELECT-OPTIONS : s_bukrs FOR t001-bukrs OBLIGATORY .
PARAMETERS : p_list TYPE c NO-DISPLAY .

START-OF-SELECTION .

IF sy-batch = 'X' AND p_list IS INITIAL .

* Submit report and get list in memory
SUBMIT zpwtest EXPORTING LIST TO MEMORY
WITH s_bukrs IN s_bukrs
WITH p_list = 'X'
AND RETURN.

* Get the list from memory.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = t_abaplist
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

* Send report to mail receipent
PERFORM send_mail .

ELSE.
PERFORM select_data .
PERFORM display_data .
ENDIF.

*SO_NEW_DOCUMENT_SEND_API1

*&---------------------------------------------------------------------*
*& Form select_data
*&---------------------------------------------------------------------*


FORM select_data.

SELECT *
INTO TABLE t_t001
FROM t001
WHERE bukrs IN s_bukrs .

ENDFORM. " select_data

*&---------------------------------------------------------------------*
*& Form display_data
*&---------------------------------------------------------------------*
FORM display_data.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_structure_name = 'T001'
TABLES
t_outtab = t_t001
EXCEPTIONS
program_error = 1
OTHERS = 2.

IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

ENDFORM. " display_data

*&---------------------------------------------------------------------*
*& Form send_mail
*&---------------------------------------------------------------------*
FORM send_mail.

DATA: message_content LIKE soli OCCURS 10 WITH HEADER LINE,
receiver_list LIKE soos1 OCCURS 5 WITH HEADER LINE,
packing_list LIKE soxpl OCCURS 2 WITH HEADER LINE,
listobject LIKE abaplist OCCURS 10,
compressed_attachment LIKE soli OCCURS 100 WITH HEADER LINE,
w_object_hd_change LIKE sood1,
compressed_size LIKE sy-index.


* Fot external email id
* receiver_list-recextnam = 'XXXXXXXXXXXX@XXXXXX.COM'.
* receiver_list-recesc = 'E'.
* receiver_list-sndart = 'INT'.
* receiver_list-sndpri = '1'.

* FOr internal email id
receiver_list-recnam = sy-uname .
receiver_list-esc_des = 'B'.
APPEND receiver_list.


* General data
w_object_hd_change-objla = sy-langu.
w_object_hd_change-objnam = 'Object name'.
w_object_hd_change-objsns = 'P'.
* Mail subject
w_object_hd_change-objdes = 'Message subject'.
* Mail body
APPEND 'Message content' TO message_content.

CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
compressed_size = compressed_size
TABLES
in = t_abaplist
out = compressed_attachment.


DESCRIBE TABLE compressed_attachment.

CLEAR packing_list.
packing_list-transf_bin = 'X'.
packing_list-head_start = 0.
packing_list-head_num = 0.
packing_list-body_start = 1.
packing_list-body_num = sy-tfill.
packing_list-objtp = 'ALI'.
packing_list-objnam = 'Object name'.
packing_list-objdes = 'Attachment description'.
packing_list-objlen = compressed_size.
APPEND packing_list.

CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
object_hd_change = w_object_hd_change
object_type = 'RAW'
owner = sy-uname
TABLES
objcont = message_content
receivers = receiver_list
packing_list = packing_list
att_cont = compressed_attachment.


ENDFORM. " send_mail


read more...

Minimum Code Required to Send SAP Mail

REPORT ztest .

CONSTANTS : c_high TYPE sodocchgi1-priority VALUE '1' .

DATA : i_content TYPE TABLE OF solisti1 ,
i_rec TYPE TABLE OF somlreci1 .

DATA : wa_docdata TYPE sodocchgi1 ,
wa_content TYPE solisti1 ,
wa_rec TYPE somlreci1 .

* Fill document data
wa_docdata-obj_name = 'MESSAGE' .
wa_docdata-obj_descr = 'test' .
wa_docdata-obj_langu = 'E' .
wa_docdata-sensitivty = 'F' .
wa_docdata-obj_prio = c_high .
wa_docdata-no_change = 'X' .
wa_docdata-priority = c_high .

* Fill object content
CLEAR wa_content .
wa_content-line = 'test mail' .
APPEND wa_content TO i_content .




* Fill receivers
CLEAR wa_rec .
wa_rec-receiver = sy-uname .
wa_rec-rec_type = 'B'.
APPEND wa_rec TO i_rec .


CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
document_data = wa_docdata
TABLES
object_content = i_content
receivers = i_rec
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.

IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.


read more...

Smartform/Sapscript Page Counter - Mode

Smart Forms records page numbering using page counters. You query these using system fields

&SFSY-PAGE& for the current page number
&SFSY-FORMPAGES& for the total number of pages in the form
&SFSY-JOBPAGE& for the total number of pages of all forms in the print job

You can use the following modes to define which values the different page counters can accept

Initialize : This will reset the page counter.
Increase : Increase the page counter by 1.
Leave Counter Unchanged : Does not increase page counter.
Page and Total Page Unchanged : Hold all the values.

Initialize, Increase, and Hold only change &SFSY-PAGE& accordingly. &SFSY-FORMPAGES& and &SFSY-JOBPAGES& are increased by one regardless of this setting.

Page and Total Page Unchanged has the effect that not only &SFSY-PAGE& but also &SFSY-FORMPAGES& remain unchanged.
Click on Read More for Picture.......................................



Page numbering mode of a form page

Mode of the counter of a form page.

The page counter can be set so that the number of the previous page is incremented, the page number is reset to its initial value, or the previous page number is repeated.


read more...

8.12.2008

Standard SAP SD Reports

Reports in Sales and Distribution modules (LIS-SIS):

Sales summary - VC/2
Display Customer Hierarchy - VDH2
Display Condition record report - V/I6
Pricing Report - V/LD
Create Net Price List - V_NL
List customer material info - VD59
List of sales order - VA05
List of Billing documents - VF05
Inquiries list - VA15
Quotation List - VA25
Incomplete Sales orders - V.02
Backorders - V.15
Outbound Delivery Monitor - VL06o
Incomplete delivery - V_UC
Customer Returns-Analysis - MC+A
Customer Analysis- Sales - MC+E
Customer Analysis- Cr. Memo - MC+I
Deliveries-Due list - VL04
Billing due list - VF04
Incomplete Billing documents - MCV9
Customer Analysis-Basic List - MCTA
Material Analysis(SIS) - MCTC
Sales org analysis - MCTE
Sales org analysis-Invoiced sales - MC+2
Material Analysis-Incoming orders - MC(E
General- List of Outbound deliveries - VL06f
Material Returns-Analysis - MC+M
Material Analysis- Invoiced Sales - MC+Q
Variant configuration Analysis - MC(B
Sales org analysis-Incoming orders - MC(I
Sales org analysis-Returns - MC+Y
Sales office Analysis- Invoiced Sales - MC-E
Sales office Analysis- Returns - MC-A
Shipping point Analysis - MC(U
Shipping point Analysis-Returns - MC-O
Blocked orders - V.14


Order Within time period - SD01
Duplicate Sales orders in period - SDD1
Display Delivery Changes - VL22


read more...