[go: up one dir, main page]

0% found this document useful (0 votes)
29 views2 pages

SWO1

The document discusses steps to create a business object in SAP, including creating an object type, event, synchronous method, and key fields. It provides details on statuses for different object components and generating the final business object.

Uploaded by

Ganesh Chaudhary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views2 pages

SWO1

The document discusses steps to create a business object in SAP, including creating an object type, event, synchronous method, and key fields. It provides details on statuses for different object components and generating the final business object.

Uploaded by

Ganesh Chaudhary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

SWO1- Create a business object.

Give the business object name prefixed with Z_.

Object type: Z_TESTXX


This is the internal technical key.
Object type can have maximum 10 characters. This must be unique across all object type. Objects are
specific instances of object types at runtime.

Object name: Object_Name_for_XX


The object type is addressed with this name by external applications. This is a descriptive English
name and can be up to 32 characters. This also must be unique across all object type.

Name: Object Name: XX


This is a meaningful name of the business object.
Description: Object Description: XX
Object description, can be up to 40 characters.
Program: Z_TESTXX
Each object type has an ABAP/4 program in which methods of the object are implemented. This
program is generated automatically when you create or revise an object type.
Application: indicates cross application.

3: Create an event.
Open the Object type in change mode. When you change your subtype the first step is to create a
new event, this is done by selecting the Event node and clicking the create button. Give the event a
name and a description. Next set the status of this object type component to implemented.
Event: Z_EVENT_XX
Name: Event name: XX
Description: Event Description: XX
Click on the new event and
Edit - Change Release Status- Object Type Component - Implemented
(A small box sign vanishes from the right side of the event, indicating that it is implemented)
There can be multiple triggering events for a standard/customer task.
In R/3 4.0 the release strategy for new Object Types and Object Type Components (methods,
attributes, events, etc.) was enhanced. Now when an object type and/or components are created,
there are different statuses to select, based on its required purpose.
The statuses are:
Modeled - objects cannot be accessed at runtime. This is the status that is automatically set when an
object type or component is created. Items with a modeled status cannot be referenced in any type
of workflow task.
Implemented - objects can be used internally in a test environment. They are accessible, but may not
be stable (especially if no delegation has been defined).
Released - objects are ready for production. Note: Local objects cannot be released.
Obsolete - objects are typically replaced by new functionality or incompatible with previous versions.
This status is optional.
4: Create a method.
Next a method must be created without using any function module template. When creating the
method ensure that the method call is synchronous - this means that the method doesn't require a
terminating event.
A method can be synchronous or asynchronous. Synchronous Method
Method that, for the duration of its execution, assumes the process control and, after its execution,
reports to the calling component (work item manager, in this case).
Synchronous methods can return the following data, if defined: Return parameters, one result and
Exceptions.
Terminating events can also be defined for a single-step task described with a synchronous method.
At runtime, the relevant work item is then terminated either when the synchronous method is
successfully executed or when one of the defined terminating events occurs.
Asynchronous Method
Method that, after its execution, does not report directly to the calling component (work item
manager, in this case).
Asynchronous object methods do not return results, parameters or exceptions.
At least one terminating event must be defined for a single-step task described with an asynchronous
object method.
At runtime, the relevant work item is only terminated if one of the defined terminating events
occurs.
Next set the status of this object type component to implemented. The methods are not
implemented unless you once open their program. Select the method and open its program. It gives
a message Do you want to generate a template automatically for the missing section. Click Yes. Inside
the program insert the code CALL TRANSACTION B0. Display Financial Document.
Method: Z_METHODXX
Name: Method name: XX
Description: Method Description: XX
Edit - Change Release Status - Object Type Component - Implemented
5. Create Key fields.
Create key fields with ABAP dictionary field proposal.
It is the identifying key, via which the system can access a specific object, that is, an instance of the
object type. The key fields of an object type are usually also the key fields in the table containing the
header data for the object type. Only character-based data types are allowed as key fields. The total
length allowed for all key fields is 70 characters. Each key field refers to a field in the ABAP Dictionary.
Enter BKPF in table name field and select all the key fields. Press Continue button. Next set the status
of these key fields to implemented.
Edit - Change Release Status -Object Type Component - Implemented
6:Implement business object.
The whole business object needs to be implemented so click on the business object title andu2026
Edit - Change Release Status - Object Type - Implemented
Now you can check the syntax, generate the Business Object and then test it. Execute the custom
method you created and give the Company code, Document number and Year.

You might also like