0% found this document useful (0 votes)
32 views7 pages

Derived Types in RAP

Derived types in RAP and how they can be used

Uploaded by

anand2201206
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)
32 views7 pages

Derived Types in RAP

Derived types in RAP and how they can be used

Uploaded by

anand2201206
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/ 7

Rupesh Kadge

SAP Technical Consultant

WHAT ARE
DERIVED TYPES
%CID, %TKY
AND %IS_DRAFT
IN RAP ?
Rupesh Kadge
SAP Technical Consultant

What is Derived types in RAP (RESTful


Application Programming) ?
derived types refer to specific predefined data types
that provide additional functionality and context for
handling business objects and their interactions. These
types are designed to facilitate the development of
applications by defining the characteristics and
operational parameters of entities within the RAP
framework.

Key Characteristics of Derived Types in RAP

Specialized Functionality: Derived types often


encapsulate specific behaviors or attributes that are
essential for managing business entities effectively.
This includes aspects like identification, state
management, and error handling.
Rupesh Kadge
SAP Technical Consultant

Standardization: By using derived types, developers


can ensure consistency across applications. This
standardization helps in maintaining code quality and
improves collaboration among development teams.

Enhanced Readability: Derived types provide


meaningful names and structures that make the code
easier to read and understand. This improves
maintainability and reduces the likelihood of errors.

Common Derived Types in RAP:


%cid
This data type represents the Client ID. It is used to
uniquely identify a client session of the application. The
%cid type is often used in scenarios where multi-
tenancy is involved, ensuring that data is accessed in
the context of the appropriate client.
Rupesh Kadge
SAP Technical Consultant

%cid_ref
This data type refers to a Client ID Reference. It is
used to reference or point to a specific client ID in
contexts where the identification of a client is
important, such as when managing data across
different clients or in multi-tenant environments.

%tky
Represents the Technical Key. This is used to uniquely
identify an instance of a business object. In RAP, each
entity typically has a technical key that can be used
for operations such as data retrieval, updates, and
deletions.

%is_draft
This data type indicates whether a business object
instance is in draft status. It is crucial in scenarios
where changes are made to an object but are not yet
finalized. This allows developers to handle draft
instances differently from finalized ones, such as
allowing modifications or saving them for later.
Rupesh Kadge
SAP Technical Consultant

%pid
This represents the Process ID. It is used to identify the
specific process context in which a particular operation
is being executed. %pid can be useful in tracking the
state of business processes and ensuring that
operations are executed in the correct context.

%param
This data type is used for Parameters. It is often involved
in method calls or service operations where parameters
are passed to dictate the operation's behavior. %param
helps in defining the input parameters needed for
specific functions or actions within the RAP framework.

%control
Represents a Control Structure. This data type is used to
manage the execution flow or control the state of
operations. For example, it can help in handling user
interactions, managing UI elements, or determining
which actions can be performed based on the current
state of the business object.
Rupesh Kadge
SAP Technical Consultant

%fail
Indicates a Failure Condition. This data type is used to
signal that an operation has failed. It can be utilized in
error handling or logging mechanisms to track
unsuccessful attempts at executing business logic or
data operations.

%msg
This represents a Message. It is typically used for
communication purposes, such as conveying
information, warnings, or error messages to users or other
components of the application. %msg is essential for
providing feedback and ensuring that users are informed
about the results of their actions.
Rupesh Kadge
SAP Technical Consultant

Thank You
& Stay
Tuned.

SAVE AND
SHARE

You might also like