PeopleSoft-PeopleCode调用CI-新增/修改Item值

1
2
3
4
5
6
7
8
9
10
11
12
13
//先判断有没有第一个Item,没有的话,用第一个;有的话,就新增一个;
Local ApiObject &oBankCollectionItem;
&oBankCollectionItem = &oBankCollection.Item(1);
If All(&oBankCollectionItem) Then
&oBankCollectionItem = &oBankCollection.insertItem(&oBankCollection.count());
End-If;

//根据传入的参数获取对应的数据,如果没有的话,则新增一条数据;
Local ApiObject &oBankCollectionItem;
&oBankCollectionItem = &oBankCollection.ItemByKeys(&dtEffdt);
If NONE(&oBankCollectionItem) Then
&oBankCollectionItem = &oBankCollection.insertItem(&oBankCollection.count());
End-If;