Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
6 REPLIES 6

abapdeveloper20
Contributor
0 Kudos

Hi,

This has a step by step procedure :

http://fuller.mit.edu/workflow/debugging.pdf

www.erpgenie.com/sap/workflow/debugging.htm
http://www.erpgenie.com/workflow/debugging.htm?2b5de440

http://www.esnips.com/doc/90b7763b-f9d9-4861-a273-04674b9fe3f2/Workflow
http://www.esnips.com/doc/991843e0-8686-4949-94b9-f45d90081b22/workflow

And i'll give some theory answer for ur questions

i.e.,SAP Business Workflow can be used to define business processes that are not yet mapped in the R/3 System. These may be simple release or approval procedures, or more complex business processes such as creating a material master and the associated coordination of the departments involved. SAP Business Workflow is particularly suitable for situations in which work processes have to be run through repeatedly, or situations in which the business process requires the involvement of a large number of agents in a specific sequence.

You can also use SAP Business Workflow to respond to errors and exceptions in other, existing business processes. You can start a workflow when predefined events occur, for example an event can be triggered if particular errors are found during an automatic check.

SAP provides several workflows that map predefined business processes. These workflows do not require much implementation. For an overview of these SAP workflows, refer to Workflow Scenarios in Applications.

Integration

SAP Business Workflow uses the existing transactions and functions of the R/3 System and does not change the functions. You can combine the existing functions of the R/3 System to form new business processes with SAP Business Workflow. The workflow system takes over control of the business processes. If you are already using SAP Organizational Management, you can use the organizational structure created there to have the relevant agents carry out the individual activities. It is possible to have an activity carried out by a position. This ensures that the respective occupiers of the position can carry out the individual activities during execution of the workflow. This means that personnel changes in your organization are taken into account immediately in the execution of a workflow.

Features

SAP Business Workflow provides a number of tools for defining and analyzing workflows as well as for monitoring operation.

The Workflow Builder is for displaying and making changes to workflows. You can make small extensions directly to the original workflows supplied by SAP, such as carrying out your own agent assignments or changing deadline monitoring.

There are several Workflow Wizards to support you in the definition of workflows, with which you can create specific parts of a workflow. The Workflow Wizard Explorer gives you an overview of the existing Workflow Wizards.

In order to make the functions of the R/3 Systems available to a workflow, you use business objects, which you can define and analyze in the Business Object Builder. These business objects are made available to the workflow in reusable tasks. The Business Wizard Explorer gives you an overview of all existing tasks.

The end user receives information about the activities they are to carry out in their Business Workplace. This provides them with a central overview of all the activities that they are authorized to carry out. They can commence the activities from here.

Several tools are available to the workflow system administrator, with which they can control and analyze the current workflows. The workflow system administrator is notified of problems automatically by the system.

Workflow tutorials with step-by-step and with screenshots are available at http://www.saptechnical.com/Tutorials/Workflow/Workflow.htm

Workflow creation is a very complex process and it all depends on the user requirement. You will get all necessary details in that tutorial.

I would recomend you to go through SAP Help tutorial

http://help.sap.com/saphelp_erp2004/helpdata/en/fb/135983457311d189440000e829fbbd/frameset.htm.

Program :

Sample Workflow program : VIEWING PARTICULAR USERS INBOX

REPORT z_view_workflow_inbox.

DATA  itab_list LIKE swkwlhead OCCURS 0 WITH HEADER LINE.
DATA: field_name(30),                "Check for line selection on field
      t_wi_id like SWWWIHEAD-WI_ID,
      t_uname like sy-uname.

* 'Select User ID and execute to view inbox'
SELECTION-SCREEN COMMENT 5(50) text-001 MODIF ID sc1.

* 'User ID Selection'
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
PARAMETERS:
  p_uname LIKE USR02-BNAME DEFAULT sy-uname OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b1.

* Sort Criteria
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-003.
PARAMETERS:
  p_sort1 RADIOBUTTON GROUP sor1,
  p_sort2 RADIOBUTTON GROUP sor1,
  p_sort3 RADIOBUTTON GROUP sor1,
  p_sort4 RADIOBUTTON GROUP sor1,
  p_sort5 RADIOBUTTON GROUP sor1,
  p_sort6 RADIOBUTTON GROUP sor1.
SELECTION-SCREEN END OF BLOCK b2.

*----------------------------------------------------------------------*
* Initialization
*----------------------------------------------------------------------*
INITIALIZATION.
  PERFORM update_sel_screen_attributes.

TOP-OF-PAGE.
  FORMAT COLOR COL_HEADING.
  WRITE 'Woritem ID'.
  WRITE AT 15 'Description'.
  WRITE AT 135 'Date'.
  WRITE AT 146 'Time'.
  WRITE AT 155 'Parent ID'.
  WRITE AT 168 'Task'.
  WRITE AT 183 'Status'.
  FORMAT COLOR OFF.

*----------------------------------------------------------------------*
* Start of Selection
*----------------------------------------------------------------------*
START-OF-SELECTION.
  REFRESH itab_list.

  t_uname = p_uname.
  CALL FUNCTION 'SWK_LOCAL_INBOX_GET'
       EXPORTING
            user_id    = t_uname
            user_langu = 'E'
       TABLES
            wi_list    = itab_list.

  READ TABLE itab_list INDEX 1.
  IF sy-subrc = 0.
    IF p_sort1 = 'X'.
      SORT itab_list BY wi_id.
    ELSEIF p_sort2 = 'X'.
      SORT itab_list BY wi_text.
    ELSEIF p_sort3 = 'X'.
      SORT itab_list BY wi_cd wi_ct.
    ELSEIF p_sort4 = 'X'.
      SORT itab_list BY wi_chckwi.
    ELSEIF p_sort5 = 'X'.
      SORT itab_list BY wi_rh_task.
    ELSEIF p_sort6 = 'X'.
      SORT itab_list BY wi_stat.
    ENDIF.
  ENDIF.

  LOOP AT itab_list.
    WRITE: / itab_list-wi_id,
             itab_list-wi_text,
             itab_list-wi_cd,
             itab_list-wi_ct,
             itab_list-wi_chckwi,
             itab_list-wi_rh_task,
             itab_list-wi_stat.
    HIDE itab_list-wi_id.
    HIDE itab_list-wi_rh_task.
  ENDLOOP.
  IF sy-subrc <> 0.
    MESSAGE i999(b1) WITH 'No Workflow items found in the inbox of '
                          p_uname.
  ELSE.
    WRITE: / '***', sy-tfill, 'entries ***'.
  ENDIF.

END-OF-SELECTION.

AT LINE-SELECTION.
* Return the field that the user clicked on
  GET CURSOR FIELD field_name.
  CASE field_name.
    WHEN 'ITAB_LIST-WI_ID'.
      IF itab_list-wi_id IS INITIAL.
        MESSAGE i999(b1)
          WITH 'Please double click a line on the report!'.
      ELSE.
        t_wi_id = itab_list-wi_id.
        CALL FUNCTION 'SWL_WI_DISPLAY'
             EXPORTING
                  wi_id            = t_wi_id
                  extended_display ='X'
             EXCEPTIONS
                  read_failed = 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.
      ENDIF.
    WHEN 'ITAB_LIST-WI_RH_TASK'.
      IF itab_list-wi_rh_task IS INITIAL.
        MESSAGE i999(b1)
         WITH 'Please double click a line on the report!'.
      ELSE.
        CALL FUNCTION 'SWL_WI_DISPLAY_TASK'
             EXPORTING
                  wi_id = itab_list-wi_id.
        CLEAR itab_list-wi_rh_task.
      ENDIF.
    WHEN OTHERS.
      MESSAGE i999(b1) WITH 'Field not selectable!'.
  ENDCASE.
  CLEAR: itab_list-wi_id, itab_list-wi_rh_task.

*&---------------------------------------------------------------------*
*&      Form  update_sel_screen_attributes
*&---------------------------------------------------------------------*
FORM update_sel_screen_attributes.
  LOOP AT SCREEN.
    IF screen-group1 = 'SC1'.
      screen-intensified = '1'.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.
ENDFORM.                    " update_sel_screen_attributes

REWARD POINTS IF MY REPLY IS HELPFUL

~Lakshmiraj~

0 Kudos

hi laxmiraj,

thank you for your reply regarding work flow .The information provided by u was very usefull for me

thanks and regards,

srinivas

Former Member
0 Kudos

Hi Srinivas,

Today, organizations depend on many tools and technologies to manage the information and ensure sharing of information, using both the enterprises, Intranet and the Internet.

Two of these technologies that are extensively used, include SAP R/3 to structure the data and Lotus Notes to collaborate this data. But managing both of these simultaneously can become an arduous job. Keeping this in mind, many companies came out with various approaches by using, which the two technologies can be brought together on one platform and their functionalities can be combined in one application. This application enables organizations to provide employees with single point of user-friendly access to data, enables them to access data offline and monitor workflows spanning all areas of the organization and ensures automated data entry to R/3. This text is aimed at explaining the integration and the steps that are to be taken to integrate SAP R/3 and Lotus/Domino.

Integrating SAP R/3 With Lotus Notes

Integration of SAP R/3 and Lotus Notes is brought about by using many approaches such as Lotus Enterprise integrator (LEI) and Lotus Connector. Lotus Enterprise Integrator, a Lotus tool for server-to-server data management is considered as "the middleware" for connecting and transferring or synchronizing information between Lotus Connector enterprise sources on a scheduled or event-driven basis. Lotus Enterprise Integrator (LEI) should be positioned as complementing the live access capabilities provided by Domino Enterprise Connection Services (DECS). Supporting high volume data exchange or synchronization, LEI consists of three components:

  • A Domino Application also called as the Lotus Enterprise Integrator Administrator database.

  • The LEI Server processes instructions, connecting to external data sources and moving data according to Activity defined conditions.

  • An LEI Server Log, which records data transfers and error messages.

The Lotus Enterprise Integration technologies link Domino applications to a wide variety of existing enterprise systems in customers' environments. This comprises of connectivity to popular relational databases such as Oracle and DB2, as well as Enterprise Resource Planning (ERP) systems like SAP R/3 and PeopleSoft.

Undoubtedly, the integration of Lotus Notes with SAP R/3 is perfect. Focusing on high-volume and high-reliability transactional applications, SAP R/3 is a client-server system. On the other hand, Lotus Notes and Domino provide a general-purpose infrastructure for distributed enterprise database applications and messaging services.

These integration approaches are broadly classified into two classes viz. End-User Interface and Developer Tools.

End-User Interface:

End-User Interface enables the end users to analyze, enhance and distribute R/3 report data by using both the SAP R/3 and Lotus Notes.

Developer Tools:

Developer tools are the links given to the programmers to build applications in order to associate R/3 to Notes. In this approach developers are provided with Business Application Programming Interfaces (BAPIs), which are used as R/3 business objects by the Notes developer, so as to ensure this link up.

3.0 Integration Platforms of SAP R/3 with Lotus Notes

SAP R/3 is placed on an applications layer on top of standard RDBMS databases, such as Oracle. It uses this infrastructure to provide a comprehensive set of business applications and tools. It provides support for human resource management, financial management, logistics operations and many other types of standard business functions. SAP supports three core APIs:

Advanced Business Applications Programming (ABAP/4):

The SAP 4GL language for writing enterprise applications is similar to LotusScript and provides programmatic access to all of the SAP's standard functions. For example, to access financial or accounting information held in the SAP back-end tables, you could use ABAP/4 for writing a script.

Remote Function Call (RFC) Interface:

This API is used for remotely addressing R/3's application transaction engine. For example, to remotely access a specific table or row of data within SAP's database, or log into the SAP system, the users can use a variety of standard RFCs. It also enables SAP developers to access RFCs. You can access RFCs using Notes or Domino using LotusScript and the SAP LSX implementing the ABAP/4 scripting language.

Business Application Programming Interface (BAPI):

It is used for writing standard business objects such as server, function, table, row, row collection, transaction and field for R/3. The latest releases of Domino including 4.6 and 5.0 are offering a comprehensive set of integration tools for joining Lotus and SAP core systems. Presently, there are four primary approaches to integrating R/3 and Domino:

  • A. LotusScript Extensions (LSX) for R/3

  • B. Domino Connector for R/3

  • C. Domino Mail Transfer Agent for R/3

  • D. R/3 workflow-enabled Domino mail template

The approaches that are currently available to integrate SAP R/3 and Lotus Notes are:

Lotus Connectors:

Lotus Connectors are system files that are developed using common object model interface, known as Lotus Connector API. They provide optimized access to the enterprise data from Domino. These connectors are installed on the Web Application Server platform of SAP and are used to connect to and to transfer data from the enterprise servers and other enterprise platforms. This Lotus Connector, when used with enterprise integration tools, facilitates to integrate SAP application logic with Domino applications. The Connector was developed using SAP's Remote Function Call Software Development Kit (RFCSDK) and enables execution of any SAP Remote Function Call (RFC) that is remotely callable, all BAPIs and Transactions using Batch Data Input. Using the Lotus Connector for SAP technology ensures that data transfers and queries are processed through the SAP application layer, preserving the business logic and data validations contained in SAP Remote Function Call and transaction interfaces, which comprised of SAP processes. Therefore, reading and writing SAP data is always performed through the application layer and not by directly accessing back-end database tables and by using Lotus Connectors all the business rules provided by RFC’s and SAP Transactions are maintained.

Domino Mail Transfer Agent for R/3:

A server-based add-ins, Domino MTA is used in bi-directional message transfer amid SAP R/3 and Notes, which leads to the transformation of Domino’s inbox into a universal inbox for both Domino and SAP. This tool is used to send messages to and from SAP R/3 to notes. It enables the users to send or receive mails, faxes and also disseminate the data from R/3 system to the notes mailbox. Hence, the users are required to check a common interface for reading the messages from both SAP R/3 and Lotus Notes. The Mail transfer Agent along with providing full attachment support provides users with the rich text support, facilitating R/3 mail users using any other application like Microsoft word as their e-mail editors. In addition, R/3 MTA provides all the transactional support that is required by the users. The users to make sure that the data being transferred from R/3 is properly routed to Domino can also use this support. MTA even enables the users to keep a track of all the messages that are sent or received from R/3 by tracking them in a Notes log file. As mentioned above, the Domino MTA uses add-ins. These add-ins are object client to send mail from Domino to R/3 and object server to receive mail from R/3.

Lotus Enterprise Integrators (LEI):

This tool is used to transfer the data both ways between SAP R/3 and Domino applications. LEI are the quickest way to ensure transfer of data and that too without following the tedious task of writing long lines of codes. Also, it facilitates this transfer by taking one end as a source and the other as a target. In this, the data transfer of each type utilizes a different connector such as Oracle connector and Notes connector. These connectors are used in both LEI and Domino Enterprise Connectivity Services (DECS) to ensure bi-directional access of notes and web applications of R/3 data from a Domino server.

4.0 Technical Specification on the Integration Process: How to integrate SAP R/3 with Lotus Notes using the Domino Mail Transfer Agent for SAP R/3:

The two approaches of Domino Mail Transfer Agent for R/3 and R/3 workflow enabled mail template are the ones, which are easiest to imply. These are installed, configured and made available to the users in original form without using much development. The other approaches of integration by using LEI, DECS and LSX are used as integration tools. Even out of these approaches, LSX requires developer programming while LEI and DECS both are based on the administrative-level system integration. This is supported by the fact that in both of these approaches, the users are provided with form-based control with standard administrative user interface.

Integration of Lotus and SAP R/3 is of great importance to the organizations to send messages from a Non-Domino end to a Domino end. This is achieved by using the object Server Task of a Domino Mail Transfer Agent, which is responsible for receiving mails from SAP R/3. This is accomplished by receiving the messages via the RFC function SX_OBJECT_RECEIVE, through a connection with R/3 system, built in the starting stages during the registration process.

In order to connect object server with SAP R/3, the users are required to set an environment variable on the platforms called as RFC_INI, which is a path to saprfc.ini. This path is to be stored in the Domino Program Directory. The next step is to enter the following connection details in saprfc.ini:

DEST=YOUR_MAIL_SERVER (the destination is used, when launching the Server task)

TYPE=R

GWHOST=<ip-address>

GWSERV=<sapgw##>

PROGID=<hierachical name of Domino Server>

SYSNO=<##>

Here, DEST stands for destination specifying connection information. GWHOST is the gateway host that is the R/3 system’s ip address with or without SAP router strings. GWSERV stands for the user’s system address. PROGID is an arbitrary string used to identify RFC destination from an R/3 (usually combination of server name and task name) and SYSNO stands for the system number that is with the SAP GUI.

Although the Object Server enables users to receive mails from R/3, but in order to send mails to R/3, the users are required to enable the Object Client part. In order to activate the Object Client part, the users can follow any one of the steps given below:

  • Type "load objclnt Password [ClntNo [SapMail [SapServer]]]" on the server console. Here, Password stands for the R/3 password for the system, ClntNo stands for Objclient in case of multiple instances, SapMail stands for foreign domain database and SapServer stands for server for the SAP mail database.

  • To start the Object Client automatically along with the Domain Server users can add

"ServerTasks=Replica,Router,Update,Stats,AMgr,Adminp,Sched,CalConn,Http,

objclnt Password, ..."

To the ServerTasks line of notes.ini. Or create a program document in the PNAB

Basics

Schedule

Program name:

nobjclnt

Enabled/disabled:

STARTUP ONLY

Command line:

Password

Server to run on:

mail_server/mail_org/DE

In order to check the connectivity of the object client with other systems, the users are required to type ‘show task ’ or ‘shta’ on the server console.

Integrating SAP R/3 using Lotus Connectors:

Named as the Domino Connector for R/3, Lotus launched a new connector component in June 1999. This is a simple automated R/3 integration solution to apply with Domino Enterprise Connectivity Services (DECS) to provide Notes and Web applications bi-directionally access R/3 data from the Domino server. Lotus also offers Lotus Enterprise Integrator (LEI) to expand its middleware software capabilities.

You can install Lotus Connector for SAP on both Domino server and on the Notes client and can also employ Lotus Connector in both Lotus Software Extensions and Lotus Enterprise Integration approaches.

Lotus Connectors are downloaded directly from the web or from the CD-ROM and based on the Lotus Connector classes. The various Lotus Connector classes are:

  • LC Session

  • LC Connection

  • LC Field list

  • LC Field

All of these classes come with lines of codes that are used separately in each step. In order to start with using the connection, the users are required to make a back end connection, which is achieved by loading the connector and opening the connection. Working follows it with the back end data store including selecting, inserting, updating or deleting operations. The next stage is to get result from the operations conducted in the last and finally, the application is required to iterate through or fetch result set.

The data connectors--software modules, connecting a particular data source are used by DECS and LEI both. For example, there are ODBC, Oracle, DB2, PeopleSoft and other data connectors available from Lotus. Lotus also provides the Domino Connector Toolkit, which lets you make Domino connectors to almost any third-party database product with an open C or C++ API.

As LEI is a separate product, the Domino Connector for R/3 is more closely integrated with the Domino APIs and object classes than LEI. LEI is the precursor to DECS and, therefore, the Domino Connector classes themselves.

Lotus released its Domino Connector classes for Java and LotusScript to support the R/3 interface along with the Domino Connector for R/3. The Domino Connector Classes make it simple to create customized DECS implementations for R/3 by developers.

DECS and LEI offer a more functional and structured option to the R/3 LSX. They provide a forms-driven approach for connecting Domino and R/3 and more LSX-like approach through the Domino Connector classes. A main advantage of using the Domino Connector is that it automatically includes a lot of functionality. Before this, the LSX developers used to code themselves. For example, the data connector provides functions that define real-time connections and letting Domino objects integrate/synchronize with external (SAP) data sources via a single LotusScript function. Conversely, a developer using the SAP LSX would have to do a considerable amount of LotusScript coding to get the required results.

Moreover, the Domino Connector is more server-oriented and reduces work, which R/3 LSX programmers do to start sessions and authenticate users with the R/3 services layer. Lastly, as it performs at the server layer, it gives a standardized means of implementing centralized, integrated applications for both Notes- and Web-client environments.

How to Integrate SAP R/3 with LEI Interfaces:

The integration of Notes and SAP R/3, using LEI utilizes Lotus Connectors that provide API programming support for DECS. These Connectors are more or less similar to the LSX, when compared on the basis of their complexity. During the integration process a single data connector is used for each data source to exchange the data between two heterogeneous systems. The two steps, which are involved in this integration, are forming a connection followed by creating an activity. In order to create a connection, the users are required to click on the "Create Connection" in the LEI Administrator and fill in the required fields (Table.1).

Connection Property

Description

Name

Name of this connection document

Hostname

DNS Hostname for the SAP R/3 server

System Number

SAP System number

Client

SAP Client type

Function Module

SAP RFC function called by this connection

User Name

SAP account used for this connection

Password

Password for the SAP account

Language

Default language setting supported by connection

Debug Level

The debug message level for this connection

After creating a connection, the next step is to create an activity that uses SAP connector. For this, the users are required to create a direct transfer activity. This activity is used to transfer customer details from R/3 to Domino application. This is achieved by configuring an activity between Domino and R/3 using LEI Data Transfer Activity document and can be used by both notes and web based users.

Integration using SAP R/3 Workflow Domino Mail Template:

It is possible to send and receive mails both to and from SAP R/3 to Lotus by using Domino Mail Transfer Agent for R/3. However, by using MTA, it is not possible to forward messages with work item notifications from SAP, because of the fact that these messages are not e-mails and are simply pointers to SAP business workflow applications. R/3 Workflow-Domino Mail Template acts as a solution to getting these work item notifications. By using R/3 workflow domino mail template, work item notifications are made visible in the Domino user’s mail inbox and enable users to monitor the workflow from SAP R/3.

Using design elements that are added during installation to users mail databases attains this. Periodic Agent is the first design element that is used. It is used to access profiles, which contain SAP connection and account information. For this, the users are required to logon to SAP to obtain the work item notifications. These notifications are then turned into documents, which appear in the Domino inbox and can be seen by the Domino user as a new email - from a given SAP system. This mail opens up with a special SAP work item form, which displays information about the work item to be processed. Also, the form contains action buttons, such as Display and Execute. Clicking on Execute invokes a dialog instance of the SAPGUI, logs the user in, takes the user into the work item inbox and finally executes the work item. When the user is finished, they are dropped back into Notes. The default is to run the periodic agent every two hours. It can be that an SAP work item goes out to multiple users and the first one, who processes it, takes it away from the other users. At times, this could lead to a work item notification, which is no longer valid being found in a Domino inbox. The next periodic running of the agent would clean this up. The local profiles are created in a central administration database, which contains information about the SAP systems and then a mapping from Notes User names to SAP user names. These profiles are then mailed to the Notes user and via Lotus Script the periodic agent and the SAP work item form hidden versions in the Notes user’s Domino inbox for use.

5.0 Conclusion

There exists a variety of integration methords for integrating Lotus Notes and Domino to SAP R/3. However, before attempting any type of integration between Domino and R/3, it's important to ensure that you have a clear understanding of both the systems.It would be better to have clear goals and objectives in mind with a well planned integration effort. To make the best possible use of each enviroment, integration activities should always be planned carefully. Most people like to take benefit of Domino for its ability to provide an enhanced and customizable user interface for either Notes or Web clients, while integrating SAP R/3 with Lotus Notes and Domino.

R/3 developers also like Domino as it's the best tool for integrating rich text and unstructured multimedia data within a structured SAP R/3 system. Furthermore, many people require a methodology, whereby they can take SAP R/3 structured information into a mobile offline environment, a work that Lotus Notes lets them do easily.

The best book for workflow is Practical workflow for sap its sap press edition please go through that u can learn lot from that some urls i am giving

http://searchsap.techtarget.com/expert/KnowledgebasePoseQuestion/0,289624,sid21_tax288135,00.html#

http://saptechnical.com

Thanks and Regards,

Phani.

Points Helpful.

0 Kudos

hi,

thank you for your reply regarding work flow .The information provided by u was very usefull for me

thanks and regards,

srinivas

Former Member
0 Kudos

solved