Sie sind auf Seite 1von 6

Component Interface Attributes :-

It is a integration Tool .It is mainly to access the data synchronously from people soft or
from non people soft.

For synchronous access from another application (People Code, Java, C/C++, or Component
Object Model [COM])

All component and page level validations will work in the component interface.

All events will be fixed (Related to our component)


Limitations:--

1) Pre build is the first event in CI..before events will not be executed
2) Page activate will not fire.
3) Do model, end model ,transfer ,transfer page ,do save ,do save now will not work
4) When you run a component interface, the SearchInit, SearchSave, and RowSelect
events do not fire. This means that any PeopleCode associated with these events will
not run. The first event to run is RowInit.

This section discusses, Component Interface Attributes:


• Name
• Keys
• Properties
• Collections
• Methods

COMPONENT INTERFACE PSAUTHBUSCOMP (CI PAGE


SECURITY TABLE)

GET KEYS SEARCH KEYS OF SEARCH IN PAGE SEARCH MODE KEYS


RECORD
FIND KEYS SEARCH KEYS and LIKE ADVANCED SEARCH
ALTERNATE SEARCH KEYS OF mode in PAGE
SEARCH RECORD
CREATE KEYS SEARCH KEYS OF ADD IN PAGE ADD MODE KEYS
SEARCH RECORD (if add
search record not specified
search record will act as
add.s.r)
Methods Standard and user defind A method is a function that
methods performs a specific task on a
component interface at
runtime.
CREATE METHOD Create Method will work like a IF U WANT TO ADD NEW
add button of search page. ROWS In page MEANS WHAT
Before calling this method we YOU DO ? LIKE THAT IN CI
have to assign Create keys ALSO CREATE METHOD
GET METHOD Get method will work like a IF U WANT TO UPDATE ANY
clicking on the search button ROWs or to find any rows
of a component by mentioning WHAT U DO ?
the get keys. Before calling IN CI SAME FOR GET METHOD
this method we have to assign
get keys
FIND METHOD Find method will work like a
clicking on the search button
by entering the partial
information on search page
SAVE METHOD Save method will work like a
clicking on the save button of
a component
CANCEL METHOD Cancel method to cancel the Backs out of the current
component interface …we can component interface,
say it refresh the component Equivalent to clicking the
interface instance Return to Search
Button online.

PROPERTIES Level ‘0’ Record fileds is


called properties(level 0
fileds)
COLLECTIONS Scrolls or grid of a component
is called
collections

PROPERTIES

Properties provide access to component data and component interface settings and status
when
they’re exposed through component interface. Component interfaces include two types of
Properties:
• Standard properties (Interactive Mode, GetHistoryItems, and EditHistoryItems) are
assigned automatically when a component interface is created.
Standard properties can be set to true or false. These properties are not displayed in the
PeopleSoft Application Designer.
• User-Defined Properties map to record fields on the PeopleSoft component. These
properties are displayed in the PeopleSoft Application Designer. A property can
correspond to a field or a scroll (collection).

CI DATA COLLECTIONS METHODS:


A component interface collection is a special type of property that corresponds to a scroll.
ITEM:- Item(Index)
INSERT ITEM:-
DELETE ITEM:
ITEM BY KEYS
CURRENT ITEM
CURRENT ITEM NUM
GET EFFECTIVE ITEM
GET EFFECTIVE ITEM NUM

Count Returns the number of items in a collection.


Use these interfaces to call with other programming languages.
Insert Item(Index) Inserts a new item. This is equivalent to clicking the Add button to
insert a new row when online. It takes Index as a parameter
and follows the same conventions for performing business rules
(People Code) as the online system.
Delete Item(Index) Deletes the item that is designated by Index. This is equivalent
to clicking the Delete button to delete the selected row when
online
Current Item Returns the current effective Data Row in the collection. The
behavior is consistent with effective date rules that are used
Online. This method works with effective-dated records only.
Current Item Num Returns the item number of the current effective Data Row in the
Collection. The behavior is consistent with effective date rules that
are used online. This method works with effective-dated records
only.
Get History Items retrieves history data. Selecting Edit History
Items enables
editing and saving of history data

Create a New Instance of Data Example

The following is an example of how to create a new instance of a Component Interface.


To create a new instance of data:
In this example, you are creating a new instance of data for the EXPRESS Component
Interface, which is based on the EXPRESS_ISSUE_INV component. The following is the
complete code sample: the steps explain each line.
Local ApiObject &MYSESSION;
Local ApiObject &MYCI;
&MYSESSION = %Session;
&MYCI = &MYSESSION.GetCompIntfc(COMPINTFC.EXPRESS);
&MYCI.BUSINESS_UNIT = "H01B";
&MYCI.INTERNAL_FLG = "Y";
&MYCI.ORDER_NO = "NEXT’;
&MYCI.Create();
&MYCI.CUSTOMER = "John’s Chicken Shack";
&MYCI.LOCATION = "H10B6987";
.
.
.
If NOT(&MYCI.Save()) Then
/* save didn’t complete */
&COLL = &MYSESSION.PSMessages;
For &I = 1 to &COLL.Count
&ERROR = &COLL.Item(&I);
&TEXT = &ERROR.Text;
/* do error processing */
End-For;
&COLL.DeleteAll();
End-if;
1. Get a session object.
Before you can get a Component Interface, you have to get a session object. The
session controls access to the Component Interface, provides error tracing, enables
you to set the runtime environment, and so on.
&MYSESSION = %Session;
2. Get a Component Interface.
Use the GetCompIntfc method with a session object to get the Component Interface.
You must specify a Component Interface definition that has already been created.
You receive a runtime error if you specify a Component Interface that doesn’t exist.
&MYCI = &MYSESSION.GetCompIntfc(COMPINTFC.EXPRESS);
After you execute the GetCompIntfc method, you have only the structure of the
Component Interface. You haven’t populated the Component Interface with data
yet.
3. Set the CREATEKEYS.
These key values are required to open a new instance of the data. If the values you
specify aren’t unique, that is, if an instance of the data already exists in the
database with those key values, you receive a runtime error.
&MYCI.BUSINESS_UNIT = "H01B";
&MYCI.INTERNAL_FLG = "Y";
&MYCI.ORDER_NO = "NEXT’;
4. Create the instance of data for the Component Interface.
After you set the key values, you must use the Create method to populate the
Component Interface with the key values you set.
&MYCI.Create();
This creates an instance of this data. However, it hasn’t been saved to the database.
You must use the Save method before the instance of data is committed to the
database.
5. Set the rest of the fields.
Assign values to the other fields.
&MYCI.CUSTOMER = "John’s Chicken Shack";
&MYCI.LOCATION = "H10B6987";
.
.
.
If you have specified InteractiveMode as True, every time you assign a value or use
the InsertItem or DeleteItem methods, any PeopleCode programs associated with
that field (either with record field or the component record field) fires (FieldEdit,
FieldChange, RowInsert, and so on.)
6. Save the data.
When you execute the Save method, the new instance of the data is saved to the
database.
If NOT(&MYCI.Save()) Then
The Save method returns a Boolean value: True if the save was successful, False
otherwise. You can use this value to do error checking.
The standard PeopleSoft save business rules (that is, any PeopleCode programs associated
with SaveEdit, SavePreChange, WorkFlow, and so on.) are executed. If you didn’t specify
the Component Interface to run in interactive mode, FieldEdit, FieldChange, and so on, also
run at this time for all fields that had values set.

Collection Method Purpose

Das könnte Ihnen auch gefallen