PeopleSoft-PeopleCode代码@的用法

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*
@:类似强制类型转换
Suppose a record name is in the PeopleCode variable &RECNAME. Use the @ operator to convert the
string to a component name. The following code creates a corresponding record object.
*/
&RECNAME = "RECORD." | Upper(&RECNAME);
//根据表名创建表对象
LOCAL RECORD &REC = CreateRecord(@ &RECNAME);

示例:
&FSTP_URL_PATH_ID = "C_SFTP_URL_PATH";
Local string &strUrlName = "url." | &FSTP_URL_PATH_ID;
MessageBox(0, "", 0, 0, "GetURL(@(&FSTP_URL_PATH_ID))=" | GetURL(@&strUrlName));
//根据名字获取URL对象
GetURL(@&strUrlName));