Professional Documents
Culture Documents
Workflow DAY1
Workflow DAY1
JH SOFTECH
-1www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
JH SOFTECH
Your partner to excel
SAP WORKFLOW
JH SOFTECH
ISO 9001 2008 Certified
-2www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
Basics of Workflow
Basics of BOR objects
Steps to create workflow
Followed by practical
-3www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
Procedures
Procedures contain a set of statements, and are called from other ABAP programs.
The processing blocks that you call from ABAP programs are called procedures
You define procedures in ABAP programs. When the program is generated, they remain
as standalone modules. You can call procedures in the program in which they are
defined, or from external programs. Procedures have an interface for passing data, and
can also contain local data.
ABAP contains the following kinds of procedures:
Subroutines
Subroutines are principally for local modularization, that is, they are generally
called from the program in which they are defined. You can use subroutines to
write functions that are used repeatedly within a program. You can define
subroutines in any ABAP program.
Function Modules
Function modules are for global modularization, that is, they are always called
from a different program. Function modules contain functions that are used in the
same form by many different programs. They are important in the R/3 System for
encapsulating processing logic and making it reusable. Function modules must
be defined in a function group, and can be called from any program.
Methods
Methods describe the functions and behavior of classes and their instances in
ABAP Objects. Methods must be defined in classes. When you call them, you
must observe certain special rules of object-oriented programming.
BOR
Error! Reference source not found.Error! Reference source not found.Error!
Reference source not found.Error! Reference source not found.Definition
The Business Object Repository (BOR) is the object oriented repository in the R/3
System. It contains, among other objects, SAP Business Objects and their
methods.
-4www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
-5www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
-6www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
*" EXPORTING
*"
VALUE(COMPANYCODE_DETAIL) LIKE BAPI0002_2
STRUCTURE BAPI0002_2
*"
VALUE(COMPANYCODE_ADDRESS) LIKE BAPI0002_3
STRUCTURE BAPI0002_3
*"
VALUE(RETURN) LIKE BAPIRETURN
STRUCTURE BAPIRETURN
*"------------------------------------------------------
-7www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
-8www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
-9www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
- 10 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
- 11 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
- 12 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
4. For the new object type, enter:
1. Enter the name of the implementation program of the object type and assign the
code letter of your application.
2. Confirm your entries with and save the object type created as a local object or
with package in a transport request.
Entering a delegation type
Before you process "your" object type any further, define it as the delegation type of the
supertype.
1. Exit maintenance of the object type and go back to the Business Object Builder.
Choose Settings Delegation System-wide.
2. Add a new entry to the table. To do this, choose Table view Display Change,
then Edit New entries.
3. Enter the name of the object type (supertype) for which you want to specify a
delegation type.
4. Enter the name of the subtype as the delegation type.
5. Choose .
The delegation entered is cross-client.
In all SAP Business Workflow definition tools, you still have to use the "old" object type
(supertype). However, when the definition is read and evaluated (at runtime, for F4 input
help, and so on), the definition of the delegation type (subtype) is used.
- 13 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
In the pop-up that comes up, select the radio button structure.
- 14 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
In the components tab of the structure, give the different fields and their corresponding
field types and press enter to check the compatibility and corrective ness.
Do not forget to save it in a package. You can even save it as a local object. For my
example, I save it in a package.
- 15 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
Check the structure (ctrl + F2) and activate (ctrl + F3) the structure.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Now we are done with the creation of a Structure.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Go to transaction SE37 where you create function modules. Click on create after you
enter the name of the Function module.
- 16 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
A screen as shown above would pop-up where you mention the function group to save
the function module and also provide some short text describing your function module.
- 17 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
The function module screen would look like the one above.
Go to the Attributes tab and select the radio button reading remote-enabled module.
Come back to the imports tab and provide the import parameters as shown or as per
your requirement.
- 18 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
Now in the Export tab, provide the export parameters as shown or as per your
requirement.
In the tables tab, provide the information as shown or as per your requirement.
The next screen you visit is the source code. It would look like this.
- 19 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
In the source code tab, write the following code in order to pick the data based on the
input you provide.
Now, save and check the code and activate the function module.
After successful activation,
moduleReleaseRelease.
Go
to
the
attributes
tab.
Go
to
- 20 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
Function
SAP WORKFLOW
JH SOFTECH
+++++++++++++++++++++++++++++++++++++++++++++++
Now we are done with the creation of a Function Module.
+++++++++++++++++++++++++++++++++++++++++++++++
Go to transaction SWO1 and enter the name of the BAPI you would like to create or as
shown in the screen and click the create button.
- 21 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
Save in a package.
- 22 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
The resulting screen is as follows.
Now click on the methods to drop down and see what methods are provided by default.
There would be two methods, showing in red color which come by default while creating
the BAPI.
- 23 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
Click or select the method as shown above and go to the path UtilitiesAPI
methodsAdd methods.
On the screen that follows, provide the function module name and click on the continue
icon.
- 24 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
In the ultimate pop-up, click the next step icon. We observe that the information is
predefined in the fields.
This is the next screen where you would just click on the next icon.
- 25 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
Click on Yes. You can see an information message reading ZBAPIFMT001 inserted.
Now save after you add the method. Select & Double click on the API method.
Go to Tab: ABAP Check 'API Function'.
- 26 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
- 27 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
Select the Radio button reading API Function as already said above.
- 28 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
- 29 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
- 30 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
You can see a message reading Object type status set to implemented
Now, go to: EditChange Release StatusObjectTo Released.
There would be two pop ups coming up. Click continue on the Pop Ups.
Keep the cursor on the 'Method'.
Go to: EditChange Release StatusObject type componentTO Modeled.
- 31 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
You can see the message reading status for method zbapifmt001 set to modeled.
Now, go to: EditChange Release StatusObject type component TO Implemented
You can see the message reading status for method zbapifmt001 set to
implemented.
Now go to: EditChange Releasse Status Object type component To Released
- 32 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
You can see the message reading status for method zbapifmt001 set to Released.
Click on Generate Button. (the red ball kind of button is the Generate button)
After clicking on the generate button, you can see the message reading Object type
'ZBAPI_T001' generated successfully.
Now go to BAPI Tcode (BOR) there we can find the BAPI (our BAPI)
The BAPI browser would look like the screen below.
- 33 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
You can click on the Alphabetical tab so that you can browse the BAPIs in an
alphabetical order. Find your BAPI as shown.
- 34 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Now we are done with the creation of a BAPI.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Test Your BAPI.
Enter the name of your BAPI in the transaction SWO1 and click on Test.
on
the
Execute
icon
against
- 35 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
The above screen is displayed where you would require entering the data against the
empty input fields.
- 36 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
The following screen is displayed which has some values as is indicated by the
ITEMTAB.
- 37 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
- 38 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
After executing the BAPI based on the input provided, we get the following screen.
- 39 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555
SAP WORKFLOW
JH SOFTECH
- 40 www.jhsoftech.in
Pavani Anasuya Towers, Tarnaka, Hyderabad, INDIA.Ph: +91 040- 66310555, 66311555