You are on page 1of 57

SAP - EDI communication.

SAP Documentation :
_______________________________________________________
EDI EDI
SAP  ERP
sub :
system VAN sub system NON -
SAP
It is a set of software Package which facilities integration of information
related to different areas of an originations.

 Benefits of ERP Impaction :

1.) Online / Real time information from all functional areas.


2.) Easy to merge from lower version to higher version.
3.) Standard approach of application design and development.
4.) Easy to merge with 3rd Parts tools.
5.) Long term analysis and reporting

 SAP (System ,Application , Products in data Processing) :

The company behind R/3 is SAP AG, Found by four former IBM
employees in 1972. The company’s headquarters are in Walldorf , a small German town.
The company name , SAP stands for System, Application, Products in data Processing.

 Version for SAP :

SAP

IDES
(Internal Demo Production
Educational System)

 Configuration form SAP :

SAP 4.6 B SAP 4.6C SAP 4.7 EE

Processor P III PIV PIV


Ram 256 M.B 512 M.B 512 M.B
Hard disk 40 G.B 60 G.B 80 G.B

_________________________________________________________
Niki B. Vashi Page no. : Page 1 of 59
SAP Documentation :
_______________________________________________________

 SAP R3 System :

1.) Presentation – SAPGUI.Exe


2.) Application

Services Executable Program

Dialog Update Spool Gate way Backg Enque


round

 Dialog : It is use to commotion between to application to Database area.

 Update : It is use to commotion between to Application to database area.

 Spoll : It is use to sand data to your output device [Like Printer].

 Gat way : It is use to transfer data to one system to other system.

 Back Ground :

 Enque : It is take care of Locking Mechanism.

_________________________________________________________
Niki B. Vashi Page no. : Page 2 of 59
SAP Documentation :
_______________________________________________________

 Data Types in ABAP :

N – Numeric
C – Character
I – Integer
F – Float
P – Packed Decimal
D- Date
T– Time
X-- Hexa Decimal
String - Variable length of record data type.

_________________________________________________________
Niki B. Vashi Page no. : Page 3 of 59
SAP Documentation :
_______________________________________________________

 Difference between Data Element and Direct Type :

Data Element Direct Type


 It is use to establish relation between  It dos not establish relation between
multiple table. multiple table.
 View object can hold fields whose data  View object can not hold fields whos
type is through data element data type is through data Type.
 Search help object can be assign to field  Search help object can not be create to
if the field is of Data Elements. field if the field is of Data Type.

 Data Element :
It is an object which holds the domain information , field Label information and
provides document to field.

 Domain :
It is and object hold the technical attributes of a field .
Like: Data type and Length

 View :
I sis and object which holds some specific form multiple tables. A view object
can’t hold any data.

 Search Help Object :

 Lock object :
Two type of lock avable in the ABAP/4.
 ENQUE is for careate lock and it is start from ez or ey
 DEQUR is for relace the lock and it is strart from DZ or DY.

_________________________________________________________
Niki B. Vashi Page no. : Page 4 of 59
SAP Documentation :
_______________________________________________________

 Internal Table :

It is and object which holds multiple records as long your program is under
execution.
Syntax: 1
Data : Begin of < Internal Table Name> occurs <Values>,
<Field 1>
<Field 2>
End of <Internal Table Name>

Syntax: 2
Data : <Internal Table name> Type / Like <Stretcher type>/ <Stretcher
Object> Occurs < Value > With Header Line.

 Buffer Management in Internal Table :

1.) Clear – it clear the content of header.


2.) Clear [ ] – It clear the content of Body.
3.) Refresh – It clear the content of Body.
4.) Free – Release the buffer Allocated.

 Syntax for Massage Box :


Massage I000(0) with <Type Massage >

_________________________________________________________
Niki B. Vashi Page no. : Page 5 of 59
SAP Documentation :
_______________________________________________________

 Procedures :
Procedures are local to client. There is two types of procedures in ABAP/4
1. Internal procedures
2. External procedures
 Internal procedures:
This procedure declaration and calling will be with in the report
program.

 External procedures:
The declaration is maintained under surboutine pool object. And
calling the procedure will be under a report program.

Syntax For Declaration of Procedure (If procedure is without parameters) :

Form <Procedure Name>.


<Block Of Statements>.
Endform.

Syntax For Calling of Procedure (If procedure is without parameters):

Perform < Procedure Name >


Example :
========================
For calling the procedure
Perform First_Pro.
========================
========================

For Declaration of Procedure :

Form First_Pro.

Write :/ ' Current User Name ', Sy-Uname.


Write :/ ' Current Client ', Sy-Mandt.
Write :/ ' Current Date ', Sy-Datum.
Write :/ ' Current Time ', Sy-Uzeit.

ENDFORM.
========================

_________________________________________________________
Niki B. Vashi Page no. : Page 6 of 59
SAP Documentation :
_______________________________________________________
Syntax For Declaration of Procedure (If procedure is with parameters) :

Form <Procedure Name> USING/CHANGING <Formal Parameters List>.

<Block of Statements>.
Endform.

Syntax For Calling of Procedure (If procedure is without parameters):

Perform < Procedure Name > Using/Changing <Actual Prameters List>.


Example :
========================
For calling the procedure
Perform First_Pro a b c .
========================
========================

For Declaration of Procedure :

Form First_Pro x y z .
<Block of Statements>

ENDFORM.
========================

_________________________________________________________
Niki B. Vashi Page no. : Page 7 of 59
SAP Documentation :
_______________________________________________________

 Functions :
Function returns a value. Function handle exceptions. Functions are client
independent. There is two type of function in the ABAP/4
1.) Normal function module.
2.) remote function module.

 Normal function module : It is global to there server and can be accessed in any
clients. We can pass there parameters either pass by value or pass by reference.

 Remote function module : This function module can be accessed by remote


systems(servers). And it passes the parameters only by value. Pass by reference is not
allowed for remote enabled.

 Passing the parameters by reference :


When ever we pass the parameters to a procedure by reference,
then what ever the changes i am making to formal parameters in the procedure
declaration it is going to reflect your actual parameters in main program.

Note : all procedure declarations should be maintained after main program.

 Function Group :

To Create Function group

Go to Menu Function Group Create


To Active a function group
Environment menu  inactive object  Select Function Group 
Select Function name and [active option or CTRL +f8].

_________________________________________________________
Niki B. Vashi Page no. : Page 8 of 59
SAP Documentation :
_______________________________________________________

 Macro :
It is and object which is smaller to your processor where we can use lass
not of statements in the macro declaration part. In order to improve the performance of
your program use the macro instead of processor.

Syntax for declare Macro :


Macro <Name of macro>.
<Block of Statements>.
End-of <Macro Name>.

Syntax for calling Macro :


<Macro name>.

 Data Sets :
Data set is execute application at the server level. Data set is user for
import Export the data form text file. If user want to execute at the local level then user
predefine function WS_ Upload and WS_DOWNLOAD.

_________________________________________________________
Niki B. Vashi Page no. : Page 9 of 59
SAP Documentation :
_______________________________________________________

 Check Box :
If Check Box is checked then its return ‘X’ and if it is uncheck then its return
‘ ‘ or space.

Syntax:
<Name of Check Box> As Checkbox
Example :
Education as checkBox

 Option Button :
If Check Box is checked then its return ‘X’ and if it is uncheck then its return
‘ ‘ or space.

Syntax:
<Name of Check Box> As Checkbox
Example :
OptGender as checkBox

 For Back Ground Color :

Maximum no of color available in ABAP/4 is 1 to 7 only.


Syntax :
<Statement >color <Color No>
Example :
Write : ‘Name of the Student in Niki B. Vashi.’ Color 6

 Select –Options :
To Create a Special value and values w can assign to the special data
objects in the selection screen. It is act like a internal table.
Syntax :
Select-option <name of select option> for <table name-field name)
<name of select option> - low = <value> it is refer a low value of select-
option.

<name of select option> -HIGH = <value> it is refer a HIGH value of


select- option.
Example :
Select-option Vendor_No for LFA1-LIFNER.
Vendor_No-Low = 1000.
Vendor_Ni-High = 1100.
Append vendor_no.

_________________________________________________________
Niki B. Vashi Page no. : Page 10 of 59
SAP Documentation :
_______________________________________________________

 Joins :
Joins are use to get the data from different database table with special
columns to the internal table. There are tow types of joins available in the ABAP/4
1.) Inner joins
2.) Outer Joins

 Inner Joins :
It is going to whose data available in both tables with a special fields.

 Outer Join :
It is use to get the data from different table and prevent with given to
master and any data which data available in child table going to reactive.

_________________________________________________________
Niki B. Vashi Page no. : Page 11 of 59
SAP Documentation :
_______________________________________________________

 Report :

It is and object which gats data from different table and perform process
and grantee the output to a list according to client requirements without modifying the
database. There are 5 types of report in the ABAP/4.
1.) Classical Report
2.) Interactive Report
3.) LDB Report (Logical Data base Report)
4.) SQL Query Reports.
5.) ALV Reports(SAP List Viewer Report)

 Classical Report:
It is used to data from different database table and perform process
and garnet output in a signal List.

 Events Associated With Classical Report :

1.) Initialization
2.) At Selection-Screen.
3.) At Selection-Screen on <Field Name>.
4.) Start-of-Selection
5.) Top-of-Page.
6.) End-of-Page.
7.) End-of-Selection.

 Initialization Event :
This event is fired when user execute this program for the first time .

 At-Selection-Screen :
This event is basically for checking for the value entered by the user for
the
fields of the selection screen.

 At-Selection-Screen on <field name >:


When user want to check for specific value of a field. Basically this event
is for checking individual field.

 Start-of-Selection :
This event is the first for you list. Once all the event are fired for selection
screen the data is retrieved from the database. Whatever user want to do, when ypur
report starts, is done in this event.

_________________________________________________________
Niki B. Vashi Page no. : Page 12 of 59
SAP Documentation :
_______________________________________________________

 Top-of-Page :
This event is fired when first write statement or whenever new page is
triggered. Advantage of using this event is that, whatever you write under this event is
applicable to all the pages header.

 End-of-Page :
This event is fired when end of page is reached. Advantage of using this
event is that, whatever you write under this event is applicable to all the pages footers.

 Control Brake Events :


This events is only used in the looping statements.

1.) At First Event :


This event is fired when you r enter loop first time.
Syntax :
At first .
<Block of Statements>
EndData.
2.) At First Last :
This event is fired when you r enter loop Last time.
Syntax :
At Last .
<Block of Statements>
EndData
3.) At New :
This event is fired whenever change in field value at internal table header.
Syntax :
At New .
<Block of Statements>
EndData

4.) At End of <Field Name > :


Syntax :
At End of <Field Name> .
<Block of Statements>
EndData

_________________________________________________________
Niki B. Vashi Page no. : Page 13 of 59
SAP Documentation :
_______________________________________________________
 Interactive Reports :
It is an object which garnet the output in multiple list with detail list. In
Interactive report we can maintain 20 Sub list and 1 basic list. It means we can maintain
total 21 list in the interactive report.

 Interactive Reports Events :


1.) At Line-Selection.
2.) At User-Command.
3.) At Function <Key>.

 At Line-Selection :
When user double clicking on the basic list or and secondary list triggers
the event AT-Line-Selection.

 HIDE technique :
When user double clicks on the any list user wants to displaying the
detailed information related to that particular carried on secondary list. Hence need to
store the clicked carried in some variable. So that you can access this carried for the next
list.
HIDE COMMAND temporarily store the content of clicked field in system areas.

Syntax :
HIDE <Fields >.

 At User-Command :
When user press a button and by giving some value in the command field
and pressing enter key at that time this event is fired.

_________________________________________________________
Niki B. Vashi Page no. : Page 14 of 59
SAP Documentation :
_______________________________________________________

ALV Reports (SAP List Viewer Report:):


 Reuse_Alb_List_Display is predefine function for ALV Lists.

 Type Pool :
It is used for all the detractive structure and internal tables are be matins
under your type pool object. So that any other report object can assign by just calling type
poll object in related report program.
SLIS is the predefine type pool object under this type poll object you
can find detractive structure types that are use for creating the ALV objects.

 Block ALV :
It is use where user can view different tables information in the single list
with different page.
 Reuse_alv_block_list_int is predefine function for block ALV report.
 Reuse_avl_blick_list_appent is predefine function for keep data into internal
table buffer.
 Resue_alv_block_list_display is predefine function fro display block
information to the output.

 Hiracle ALV :
It is use to display the data in hiracle manner. In this report we can
only use 2 tables.
 Resuse_alv_block_list_hs_append is predefine function for this report
 Key info object is going to matins relation ship in the 2 tables.

 SAP Query Reports :


it is na tool which is used to develop report without any code.

 SQ01 is T.Code for SQP query report.


 SQ02 is T.Code for inforset.
 SQ03 is tcode for User Group.

_________________________________________________________
Niki B. Vashi Page no. : Page 15 of 59
SAP Documentation :
_______________________________________________________

 Transactions / Dialog Program :


It is an object used to develop a application . Is is nothing but sequence of
steps called as dialog for SAP and for user it is sequence of screen which appears one
after the other depending upon the option he is selecting. The sp3cial transaction
monitor called the SAP dispatcher handles the sequence of steps that takes place in
any transition. The main takes of transaction is to update the database. The database
is not update until transaction is complete.

 Interactive phase in this step user enters the data , which needs to be inserted
or deleted or modified on to the screen. There can be single screen or multiple
screens depending upon the transaction. So this step can consist of single step
or multiple steps. In this phase you prepare database record.
 SUpdate phase. This phase process the database record and updates the
databae table. Actual updation of database table takes placein this phase.
 All transaction are associated with transaction code . and all these codes
are stored in a table called TSTC.

 Screen Painter :
It is use for set lay out and manation business logic . maximum no of
screen we can define is 9999 for each application. It is start from 0000 to 9999.

 Sub objects of screen objects :


 Layout (designee a output)
 Elements List
 Flow Logic Editor
 Attitudes
o Normal Screen
o Sub Screen
o Dialog Screen.

 Message Class :
It is use to define messages into the application. We can use same message
class into different application. Maximum no of message in one message class is 10000
it is start from 0000 to 9999.

 Menu Painter :
It is use for designee a menu for application .T.Code for menu painter is
SE41.

 Events in Flow logic Editor :


 Process before Output (POB).
 Process after input (PAI).
 Process on value request (POV).
 Process on help request (POH).

_________________________________________________________
Niki B. Vashi Page no. : Page 16 of 59
SAP Documentation :
_______________________________________________________
 Module pool Program :
It is an object which is not attached to the screen painter plays important
role in the transaction. Normally for report on like executable programs are written but
for transaction module pool programs are written . The module pool program contains
only modules to handle various associated with screen and data declaration stamens.

 Process before Output (POB) :

This event is triggered before the screen is displayed. The processing of


screen before the screen is displayed is done in this event.

 Process after input (PAI) :

This event is responsible for processing of screen after the user enters the
data and clicks the button. The processing of screen can include displaying another
screen, or just displaying list or quitting the transaction itself and many more things.
Usually it is displaying another screen. This operations can be carried out in the PAI
event.

 Process on value request (POV) :


This event request is triggered when user clicks F4 function key. You can
handle this event when the use press F4 key by writing code for the same in module
pool program. Normally when the user press F4, list of possible values is displayed.

 Process on help request (POH) :


Normally when the use place the cursor on the field and presses F1
function key the system displays its own help for that particular field. Your can add your
own functionality to the help button by writing for the same.

_________________________________________________________
Niki B. Vashi Page no. : Page 17 of 59
SAP Documentation :
_______________________________________________________
 Steps to create Transaction :
 Create module pool
 Screen painter
o In the screen give program name and screen number
Note : program name and module pool name should be
same.
 Write flow logic for each screen.
 Write code for all the events in module pool program.
 Check for any error in screen and flow logic.
 Generate each and every component of screen
 Single screen can be tested using Screen Painter.
 Create transaction code through object browser.
o T.code it is SE93.
 Generate the transaction code.
 User can execute the transaction by entering the transaction code in the
commend filed.

_________________________________________________________
Niki B. Vashi Page no. : Page 18 of 59
SAP Documentation : _______________________________________________________

_________________________________________________________
Niki B. Vashi Page no. : Page 19 of 59
SAP Documentation : _______________________________________________________

 BDC ( BATCH DATA COMUSSION /CONVERATIONS) :

BDC is user for the data conversations from the current system to the SAP R/3 system.
 BDC Methods :
1.) Call transaction
2.) Session method
3.) Direct Input method.
4.) LSMW [Legacy system migration work bench.]

 Call transaction method:

Ws_upload function
Legacy Internal Mapping BDC SAP SAP R/3
Table Code Data Application Database
system
system
 Staps for Call Transaction Method :

1.) Analyzing data from local file.


2.) Analyzing Transaction.
Analyzing the transaction involves following stapes

o The transaction code .


o Which filed require input
o Which fields you can allow to default to standards values
o The name , type, an lengths of the filed that are used by transaction.
o Screen number and name of the module pool program behind the particular transaction.

_________________________________________________________
Niki B. Vashi Page no. : Page 20 of 59
SAP Documentation : _______________________________________________________

_________________________________________________________
Niki B. Vashi Page no. : Page 21 of 59
SAP Documentation :
_______________________________________________________
3.) Declaring internal Table :
The data from internal table is not transferred directly to database table, it has to go
through transaction. You need to pass data to particular screen and particular screen-
field. Data is passed to transaction in particular format hence the need for batch data
input structure.
The batch input structures stores the data that is to be entered into
SAP System and the actions that are necessary to process the data.
This structure is BDCDATA.
The BDCDATA structure which can contain the batch input data for only a single run
of a transaction.

o Create a BDC DATA structure.


o Write the structure out to a program it with call transaction
using.
o Create a BDCDATA structure for the next transaction that is to
be processed.

4.) Transferring data from local file to internal table with us of WS_UPLOAD
function.
5.) Population of BDCDATA

 SHDB is T.Code for Transaction Recorder.

1.) first go to Transaction Recorder with the use of SHDB T.Code


2.) Click on New Recorder.
3.) Give the T.Code in which application we want to transfer a data.
4.) Click on Start Recording.
5.) Enter the demy record in the application.
6.) Click on Save button and come back
7.) Select recording name and clock on program (Sift+F5)

Syntex :
Call transaction <T.Code of Dilog program> using BDSDATA Mode
<Mode Name>
 Three types of Mode avable in the Call transaction method.
1.) A –Forground.
2.) N- No display. / Background
3.) E- Display When Error.

_________________________________________________________
Niki B. Vashi Page no. : Page 23 of 59
SAP Documentation :
_______________________________________________________

_________________________________________________________
Niki B. Vashi Page no. : Page 24 of 59
SAP Documentation : _______________________________________________________

 Session Method :
Session

Ws_upload function
Legacy Internal Mapping BDC SAP SAP R/3
Table Code Data Application Database
system
system

 SM35 is T.Code for create section.

 Predefine functions for Section method.

1.) BDC_OPEN_GROUP
2.) BDC_INSERT
3.) BDC_CLOSE_GROUP

_________________________________________________________
Niki B. Vashi Page no. : Page 25 of 59
SAP Documentation : _______________________________________________________

_________________________________________________________
Niki B. Vashi Page no. : Page 26 of 59
SAP Documentation :
_______________________________________________________

 Difference between Call Transaction method and Session :

Call Transaction Method Session Method


 It is use for import small amount of data It is use for import large amount of
. data .
 Is is slower then session method.  It is faster more then faster call
transaction method.
 Log is not mention in the call  Log is mention in the session method
Transaction method
 In this method we can update the data at  We can update the data when we will
the same time required.

 LSMW (Legacy system migration work bench) :

It is an tool which update data from legacy system to R/3 system without writing
any code.
 Methods in LSMW
1.) Direct Input.
2.) Batch Input.
3.) IDCO
4.) BAPI ( Business application programming inter face.)

 LSMW is T.Code for LSMW method :

1.) Enter LSMW T.Code is commend line.


2.) Give the project name ,Sub Project name , Object Name.
3.) Click on Execute
4.) Click on Personal menu to chose the options.
5.) In Personal menu Uncheck
 Maintain fixed value, transaction , user-define routines,
 Start Direct input program.
 Start IDOC Creation.
 Start IDOC processing.
 Create IDOC Overview.
 Start ICOC post-processing.
 Frame program for periodic data transfar.
6.) Click on Execute.
7.) Chose Batch input Recording.
8.) Give any user difine name in the recording box and click on create
9.) To pass value from recording to target structure click on default all.
10.) Save and come back.
_________________________________________________________
Niki B. Vashi Page no. : Page 28 of 59
SAP Documentation :
_______________________________________________________

 SAP Business Workflow (BC-BMT-WFM) Purpose

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.

_________________________________________________________
Niki B. Vashi Page no. : Page 29 of 59
SAP Documentation :
_______________________________________________________

 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.

BC - Workflow Scenarios in Applications Purpose

 SAP Business Workflow®


With SAP Business Workflow, SAP AG provides an efficient cross-
application tool enabling integrated electronic management of business processes.
SAP Business Workflow is a solution which has been integrated fully in the R/3
System and which enables customer-specific business process flows to be
coordinated and controlled on a cross-application and cross-work center basis.
SAP Business Workflow therefore enhances "ready-made" application software.
The SAP Business Workflow definition environment can represent business
processes simply and can respond to changing external conditions quickly, even
in a live system, by adapting the existing business processes.

 Workflow Scenarios
Many SAP applications support process control via SAP Business
Workflow and you can therefore use the preconfigured workflow scenarios in
different situations. The scenarios can either be implemented without any changes
or used for your business processes after minor adjustments. These workflow
scenarios reduce implementation time significantly and have been optimally
configured for the respective application functions. Many workflow scenarios are
integrated in IDES (International Demonstration and Education System). It is

_________________________________________________________
Niki B. Vashi Page no. : Page 30 of 59
SAP Documentation :
_______________________________________________________
possible to simulate the business processes of a model company in this fully-
configured system.

_________________________________________________________
Niki B. Vashi Page no. : Page 31 of 59
SAP Documentation :
_______________________________________________________

 Features

What is a workflow scenario?

The term "workflow scenario" describes the whole range of options which
are available for supporting workflow functionality in an application. The
workflow scenarios can be divided into three categories:

 Creating events
Events are created to report status changes for an application object and to
allow a reaction to the changes.

 Technical Principles of SAP Business Workflow


The definition and execution of a workflow can be divided into four main
areas. A user executes workflows in their Business Workplace where the work
items that they can execute are displayed. A workflow must be defined to be
executed. To this end, a workflow definition is created in the Workflow Builder.
This definition contains steps that are executed at runtime. The step either control
the workflow directly or they contain a reference to a task. The task refers to a
method of an object type in the Business Object Repository (BOR) and can be
executed at runtime either automatically (background task) or by a user (dialog
task).

_________________________________________________________
Niki B. Vashi Page no. : Page 32 of 59
SAP Documentation :
_______________________________________________________

 Business Workplace and work items

Work items are displayed to the user for execution in their Business
Workplace. Work items are instances of a workflow at runtime. Their are various
types of work item. Only certain types are displayed in the Business Workplace.

 Workflow and workflow definition

A workflow must be defined before it can be executed. This workflow


definition s made up of steps that control the workflow or refer to the tasks to be
executed. You can make additional specifications about agents and deadline
monitoring for a step. These specifications are evaluated at runtime by the work
item manager. The workflow is started either manually or by the system at
runtime. For the system to start a workflow, the workflow definition must contain
a triggering event (for example the event "material created"). When the event
occurs, the relevant workflow is started automatically.When you activate a
workflow definition , you automatically generate a runtime version. When the
workflow is started (manually or automatically), the relevant runtime version is
used for the execution. If the workflow definition is changed later and a new
runtime version is generated, these changes do not affect workflows that are
already being executed.

 Tasks :

Tasks describe elementary business activities. Tasks always refer to a


method of an object type. Possible agents are defined for tasks. Tasks can refer to
automatically executable methods (background tasks) or they can need a user to
execute them (dialog tasks).

_________________________________________________________
Niki B. Vashi Page no. : Page 33 of 59
SAP Documentation :
_______________________________________________________

 Object types and objects :

An object type describes the data with which you want to work in a
workflow, for example the object type Material . An object is an individual data
record of an object type. Attributes are defined for an object type, which make up
its data record (for example, material name or material number). Each object type
has methods, in which activities are defined, which can be executed with the data
(for example, create material). The transactions and functions of the R/3 System
can be called in a method as can your own transactions or other applications. The
last important component of an object type are its events. These describe the
status changes that an object can undergo (for example, material deleted or
material changed). A workflow can be started by an event of this kind being
triggered. The Business Object Repository provides an overview of all object
types in the R/3 System. You can use or extend the existing object types as well
as create new object types.

Document 4711/98 posted


Material XYZ created
These events can be used as triggering events for customer tasks or
workflow tasks. The events are therefore "connected" in a flexible and customer-
specific way to application events, without having to modify the standard part of
the application.
In some cases, the triggering of these events is not activated in the standard
version, but depends on the customizing settings. You can find further
information in the application scenario documentation.

 Providing standard tasks :

A standard task contains a task description (long text) and the connection
to the application logic via the method for a business object. Before a standard
task can be used live, the assignment of the standard task to the possible agents
must be maintained. The standard tasks provided by SAP are generally used as
steps in a workflow template. The tasks are available as "modules" which you can
use for your own developments.

Release change request


Change purchase order
If a workflow scenario only involves one standard task, the scenario can
usually be regarded as a minimal solution for showing the connection between
application functionality and SAP Business Workflow. For differentiated
workflow management, this standard task should be replaced by a customer-
specific workflow task. You can find further information in the application
scenario documentation.

_________________________________________________________
Niki B. Vashi Page no. : Page 34 of 59
SAP Documentation :
_______________________________________________________

 Formatting workflow templates

A workflow template contains a complete workflow definition, which


includes several steps. Such a workflow template is complete from the point of
view of the definition, but must still be adapted to the organizational environment
of the customer.

Release a purchase requisition


Recruitment
In cases in which workflow templates describe business processes which
also occur in your company, or in cases in which changes should not be made to
the workflow template for technical reasons, the workflow templates supplied by
SAP can be used live without any changes. In all other case, you can use the
workflow templates as the basis for your own developments. The existing process
structures of the business application components, which are often represented
within a transaction, are generally not replaced. SAP Business Workflow is seen
as an integration level "above" the standard business functions and uses the
existing transactions, function modules, and reports.

 Using this Documentation :

The SAP Business Workflow documentation has two main parts:

 Role Documentation
You use this part of the documentation if you:
 Have one of the workflow roles defined in the role-based procedure model
 Have little or no experience using SAP Business Workflow
 Want to get an overview of the main functions of SAP Business Workflow

 Reference Documentation
You use this part of the documentation if you:
 Require a comprehensive overview of all functions of SAP Business
Workflow
 Are interested in detailed information
 Want to look up a particular subject

_________________________________________________________
Niki B. Vashi Page no. : Page 35 of 59
SAP Documentation :
_______________________________________________________

 Message Control Method :

Message Control is a cross application component used as a service


program in several areas. The biggest application is in pricing. The basic concept
behind message control is to generate and manage outputs from an application
and control their timing and medium of exchange.

Application

Message Control
Business Business Business
Rule Rule Rule
Business Business
Rule Rule

Mail Fax Printer EDI Workflow ALE

Outputs Managed by Message Control

_________________________________________________________
Niki B. Vashi Page no. : Page 36 of 59
SAP Documentation :
_______________________________________________________
 The Benefits of Message Control. :

 Disconnecting the process of creating an application document from the process


of generating outputs.

 Automatically proposing output based on business rules specified in Message


Control.

 Overriding the automatic proposal.

 Manually selecting an output.

 Generating multiple outputs.

 Controlling the timing, medium and language of the output messages.

 Retransmit ting an output

 Monitoring the results of execution.

To find a complete list of applications in that currently use Message Control


the T-Code is NACE.

Message control is a service module, and applications call the message control
services using standard function modules of Message control. A list of applications
commonly used in EDI process and enabled for Message Control follows.

 Billing
 Delivery schedule
 Purchasing
 Purchasing outline agreement
 Request for quote.
 Sales
 Shipping
 Transportation

The Message Control Components To understand the Message Control


process, it is important to clarify the terminology and identify the various
components. Output types are also called messages, message types, or condition
types. Procedures are also called message schemas.
Condition type and Condition record are two separate things.

_________________________________________________________
Niki B. Vashi Page no. : Page 37 of 59
SAP Documentation :
_______________________________________________________

 The Message Control components :

Application

Procedure *Active Procedure Procedure

Output Type Output Type Output Type


Mai EDI Fax
l

Access Sequence Access Sequence Access Sequence

Condition Table Condition Table Condition Table Condition Table

Data Data Data Data Data Data Data Field


field field field field field field field Catalo
g

The Output type - An output type defines the characteristics and attributes of the
output.

The Access Sequence – An access sequence defines a sequence in which business


rules are checked for proposing an output type.

The Condition Table – The Condition table specifies the key fields for a business
rule.

The Condition Record - Condition records are inserted in the condition


table. Condition records contain the actual data against which the business rules

_________________________________________________________
Niki B. Vashi Page no. : Page 38 of 59
SAP Documentation :
_______________________________________________________
are checked to propose an output.

 How Message Control Works :

It is a Three step process.


1. Output Proposal.
2. Output Editing.
3. Output Processing.

Application

Communication
Access
Structure
Condition
Record
Message Control

Output
values
NAST
Entries

Status

TNAPR table RSNAST00

Message Processing

EDI Fax Print ALE Workflow

Components used in Message Control to propose outputs

_________________________________________________________
Niki B. Vashi Page no. : Page 39 of 59
SAP Documentation :
_______________________________________________________

 ALE (Application Link Enabling) :

"ALE (Application Link Enabling) supports the construction and


operation of distributed applications. ALE handles the exchange of business data
messages across loosely coupled SAP applications, ensuring that data is
consistent. Applications are integrated by using synchronous and asynchronous
communication, rather than by means of a central database."

 What is ALE?

ALE is SAP proprietary technology that enables data communications


between two or more SAP R/3 systems and/or R/3 and external systems. ALE
provides intelligent mechanisms whereby clients can achieve integration as well
as distribution of applications and data. ALE technology facilitates rapid
application prototyping and application interface development, thus reducing
implementation time. ALE comes with application distribution/integration
scenarios as well as a set of tools, programs, data definitions, and methodologies
that you can easily configure to get an interface up and running.

 Architecture of ALE :

 Application layer :
This layer provides ALE with an interface to R/3 to originate or
receive messages containing data to or from external (or other R/3) systems.

 Distribution layer :
The distribution layer filters and converts messages containing data
based on predefined or custom-defined rule sets. These conversions may
occur to ensure compatibility between different releases of R/3 and R/2.

 Communications layer :
ALE communications are carried out both synchronously and
synchronously.

_________________________________________________________
Niki B. Vashi Page no. : Page 40 of 59
SAP Documentation :
_______________________________________________________


Advantages of ALE :

• ALE offers better inbound interface performance compared to traditional


techniques such as Batch Data Communications (BDC) or Call Transactions. ALE does
not use screen-based batch input.

•ALE provides black-box technology, so the user is at a higher level.

•ALE is the strategic architecture for R/3 “loose coupling” with legacy and third-party
applications and is a Business Framework key element. It provides a message-based
architecture for asynchronous integration of Business Framework components, including
Business Components, Business Objects, and BAPIs.

 Components of ALE :

• Legacy System.
• Message type
• IDOC type
• Customer Distribution Model
• Filter object type and filter objects
• Change pointers
• Ports
• Process codes.
• Partner profile.
• Message Control

 Logical System (LS)

It is the representation of an R/3 or external system in SAP R/3 for the


distribution of data to and from the R/3 System .

 A message type :

It characterizes the data sent across systems and relates to the structure of
the data called an IDOC type (see below). For example, MATMAS is a message
type for Material Master, and INVOIC is a message type for an Invoice (Billing
Document).

 An Intermediate Document (IDOC) :


It type represents the structure of the data associated with a message type
(DEBMAS02 for message type DEBMAS — Customer Master). an IDOC is an

_________________________________________________________
Niki B. Vashi Page no. : Page 41 of 59
SAP Documentation :
_______________________________________________________
object containing the data of a particular message type. IDOCs are data containers
with intelligence built in.

_________________________________________________________
Niki B. Vashi Page no. : Page 42 of 59
SAP Documentation :
_______________________________________________________
 The Customer Distribution Model :
It is a tool that stores information about the flow of messages across
various systems.

 A filter object type :

It is used in the Customer Distribution Model to impose a selection


criterion on the message (type) flowing to a Logical System. A filter object type
with a value associated with it is called a filter object

 Change pointers :

They are R/3 objects that mark changes to SAP master data. Change
pointers are managed by mechanisms in a Shared Master Data (SMD) tool and are
based on Change Document (CD) objects. CD objects record the changes
occurring to master data at a field level. These changes are stored in tables
CDHDR (header table) and CDPOS (detail table).

 A port :

It is a logical representation of a communication channel in SAP. There


are four types of ports that can be defined in R/3: tRFC, File, R/2, and Internet.

 Process codes :

They are used in ALE and EDI to identify the function module or API.
Each process code is associated with a message type. Outbound process codes are
stored in table TEDE1, while inbound process codes are stored in TEDE2. Use
transaction WE41 to display outbound process codes and WE42 to display
inbound codes

 Message control :

It is a mechanism by which documents are output based on certain


selection criteria, requirements, and sequences. Message control determines the
type of document, its timing, number, and medium (print, fax, ALE, or EDI.)

 A partner profile :

It is an identifier for a system used for communicating messages. There are four
types of partner profiles: KU for Customer, LI for Vendor, B for Bank, and LS for
Logical System. KU, LI, and B are used for EDI partners, while LS is used for
ALE communications

_________________________________________________________
Niki B. Vashi Page no. : Page 43 of 59
SAP Documentation :
_______________________________________________________
 Idoc Definition :

An intermediate document (IDOC) is a container for distributing R/3


application data among between R/3, R/2 and non-SAP systems
 Use of IDOC :

ALE uses IDocs to exchange data between logical systems. Non SAP-systems can
use IDocs as the standard interface for data transfer. IDocs are created by
message types and (object) methods when data is to be distributed. The message
type is the format in which the data for a specific business process is transmitted
electronically.

_________________________________________________________
Niki B. Vashi Page no. : Page 44 of 59
SAP Documentation :
_______________________________________________________

 Structure :

An IDoc represents a configuration of an Idoc Type that determines the IDoc


structure. An IDoc consists of a header, several data segments and status records. The
functions of the individual elements of an IDoc are as follows:

• The contents, structure, sender, receiver and current status of the IDoc are
defined
in the IDoc header.

• Each data segment contains a standard header consisting of a sequential segment


number, a description of the segment type and a 1000 character long string field
containing the actual data of the segment.

• The status records show the history of the processing steps applied to the IDoc.

*An IDoc can only contain character fields.

_________________________________________________________
Niki B. Vashi Page no. : Page 45 of 59
SAP Documentation :
_______________________________________________________
In the example shown the IDoc contains a header segment that has to be the first segment
of the message. Thereafter there must be at least one additional item. The following
conditions apply:

•Each item must be followed by at least one sub-item and at most 99.
•Up to 9999 text segments can appear after an item’s sub-items (optional).
•The last segment in a message must be an accumulation segment
(ACCUM).

 In the Sending System:

 A list of IDocs grouped by status is displayed:

Status Description of Status


03, 12, 38 IDoc successfully transferred
02, 04, 05, 25,26, 29 Processing error
30 Waiting status

Transaction Code for IDoc list is : WE05

 In the Receiving System

Status Description of Status


53 IDoc successfully updated
64 Waiting status (still processing...)

63,65 Inbound error

Transaction Code for IDoc list is : WE05

 Message Types :

T-Code to view the Message Types is : WE81.

APPLICATION Message type


Customer DEBMAS
Vendor CREMAS
Material MATMAS
Sales Order ORDRSP
Purchase Order ORDERS

_________________________________________________________
Niki B. Vashi Page no. : Page 46 of 59
SAP Documentation :
_______________________________________________________

 Transaction code for ALE

/N SALE : To Define and Assign Logical Systems .


/N SM59 : To Establish RFC Connection.
/N BD64 : To Create Customer Distribution Model.
/N BD82 : To Generate Partner Profiles.
/N WE05: To View IDoc Lists.
/N BD10: To Send the Material Data.
/N BD11: To Receive the Material Data.
/N WE19: To Debug the IDoc.

_________________________________________________________
Niki B. Vashi Page no. : Page 47 of 59
SAP Documentation :
_______________________________________________________

_________________________________________________________
Niki B. Vashi Page no. : Page 48 of 59
SAP Documentation :
_______________________________________________________
Start outbound program

Application
Data
Outbound ALE
Program

Application
Repository
Master
IDOC

ALE ALE Service Layer


Distrubutio
n
model

CIdoc
CIdoc CIdoc CIdoc

Communication Layer

Receiver1 Receiver2 Receiver3 Receiver4

_________________________________________________________
Niki B. Vashi Page no. : Page 49 of 59
SAP Documentation :
_______________________________________________________
Inbound Processing
using a direct function module Application
Repository
IDOC
IDOC
IDOC IDOC

Direct Input
Function module or
CALL transaction

Posting Program

RBDAPP01

Application
IDocs

Conversion Filtering Version Change

IDOC_INBOUND_ASYNCHRONOUS

Communication Idoc
from remote system

_________________________________________________________
Niki B. Vashi Page no. : Page 50 of 59
SAP Documentation :
_______________________________________________________

 EDI (Electronic Data Interchange ):

EDI provides business process integration across companies by exchanging


business documents such as purchase orders, invoices, and shipment notices in electronic
form, using industry standard formats such as ANSI X12 ( American National standards
Institute) and EDIFACT (Electronic Data Interchange For Administration, Commerce,
and Transport).
 What is EDI?

EDI is the electronic exchange of business documents between the computer


systems of business partners, using a standard format over a communication network.

_________________________________________________________
Niki B. Vashi Page no. : Page 51 of 59
SAP Documentation :
_______________________________________________________

Typical Business document exchanged by business partners


Request for Quote

Quote Vendor
Customer
Purchase Order
Order
Purchasing Order Acknowledgement Management

Purchase Order
Change Manufacturing

Shipment Notice
Receiving Shipping
Carrier
Shipment Bill of
Status Lading
Billing
Invoice
Accounts
Payable Accounts
Receivable

Account Information
Remittance Advice
Customer EFT Supplier
Payment Data Bank Bank

Account Information

_________________________________________________________
Niki B. Vashi Page no. : Page 52 of 59
SAP Documentation :
_______________________________________________________

Components of the EDI system

Vendor Customer

Application Application
Program Program

Business
document Business
document

Value -
Added
Translator Network Translator
EDI message EDI message

_________________________________________________________
Niki B. Vashi Page no. : Page 53 of 59
SAP Documentation :
_______________________________________________________
 Differences between ANSIX12 / EDIFACT :

 EDIFACT calls business documents messages and represents them by a


name such as ORDERS for a purchase order, whereas ANSIX12 calls
them transactions and represents them by a number such as 850 for a
purchase order.

 EDIFACT uses the same segment in multiple places , where as ANSI has
a specific use for each segment.

 EDIFACT has additional segments that apply to international trade.

 Conditional fields in EDIFACT are the same as optional fields in


ANSIX12.

 Components of the EDI System :

 Trade Partners :
 The trading partners can be any combination of organization or business types.

 Application program : AP’s are responsible for generating and processing data
in business documents

 Business document : A business document is a legal document that defines the


transaction conducted between trading partners.

 Translator : The translator is responsible for mapping application data to the


EDI standard format .

 EDI Message : The standards EDIFACT /ANSIX12 defined various EDI


messages that govern the rules , format, and content of data in a transaction .

 Value-Added Network : The VAN provides a mailbox on the network to each


trading partner. This mail box is polled periodically for messages. The application
software does not have to be connected or running at the time of message
exchange.

_________________________________________________________
Niki B. Vashi Page no. : Page 54 of 59
SAP Documentation :
_______________________________________________________
The SAP EDI process comprises two distinct process

_________________________________________________________
Niki B. Vashi Page no. : Page 55 of 59
SAP Documentation :
_______________________________________________________

EDI OutBound Process

EDI-
DB
Enabled
repository
application
App doc
Selectio
n
progra idoc
m
VAN
Outboun
d trigger
program Idoc
EDI sub
file
System
Edi
doc

_________________________________________________________
Niki B. Vashi Page no. : Page 56 of 59
SAP Documentation :
_______________________________________________________

1. Application document is created.


The outbound process involves creating an application document, such as
purchase order, sales order, and saving it in the database tables.

2. The IDoc is generated

The application document just created is formatted to an IDoc format. The data
in the application document format is suitable for the application modules, screens and
internal programs. A document in an IDoc format is suitable for processing by EDI
components.

3. The IDoc is transferred from SAP to the Operating system layer.


Document in IDoc format resides in the SAP database repository. This Idoc
document must be passed down to the Operating System layer for processing by the EDI
subsystem. The IDoc is transferred to the operating system as a text file. The document
is still in an IDoc format. The only difference is the medium of storage.

4. The IDoc is converted to EDI standards


For EDI purposes, the document in Idoc format has to be converted into an EDI
standard format. A type of third-party software called a translator carries out the
transformation process and reports status back to the SAP system. SAP refers to these
translators as EDI subsystems. SAP takes no responsibility for translation it just
maintains the status reported by the EDI subsystem.

5. The EDI document is transmitted to the business partner.


After the document is converted to an EDI standard format, it is transmitted to
a trading partner based on the partner’s EDI settings.

6. The Edi subsystem reports status to SAP


when and Idoc is under the control of the EDI subsystem, the subsystem can
optionally report the state of processing at various milestones back to the SAP system.

_________________________________________________________
Niki B. Vashi Page no. : Page 57 of 59
SAP Documentation :
_______________________________________________________

EDI Inbound Process

EDI-
DB
Enabled
repository
application
App doc
Posting
progra
m idoc
VAN
Inbound
trigger
program Idoc
EDI sub
file
System
Edi
doc

_________________________________________________________
Niki B. Vashi Page no. : Page 58 of 59
SAP Documentation :
_______________________________________________________
1. The EDI transmission is received.
Edi documents are received from business partner via the VAN. These documents
are in one of the EDI standard formats.

2. The Edi documents is converted into and Idoc.

The document is converted into an Idoc format suitable for SAP applications. The
process is carried out at the EDI subsystem level.

3. The IDoc is transferred to the SAP layer


The IDoc created is stored in text file at the operating system layer. The
subsystem starts an inbound program in the SAP layer. This Program reads the Idoc file
and creates and Idoc in the SAP repository for further processing.

4. The application document is created.


The IDoc received form the subsystem is passed to a posting program. This
program creates an application document such as sales order, purchase order
acknowledgement, invoice , or shipment notice.

5. The application document can be viewed.


The application document can be viewed via EDI is the same as any document
created manually in the system.

_________________________________________________________
Niki B. Vashi Page no. : Page 59 of 59

You might also like